Skip to content

Commit

Permalink
yay
Browse files Browse the repository at this point in the history
  • Loading branch information
SchleimKeim committed Nov 24, 2011
1 parent 45f3c56 commit 4ef42d8
Show file tree
Hide file tree
Showing 28 changed files with 162 additions and 119 deletions.
Binary file modified Cugar/Cugar.suo
Binary file not shown.
31 changes: 16 additions & 15 deletions Cugar/Cugar/Cugar.csproj
Expand Up @@ -77,45 +77,45 @@
<ItemGroup>
<Compile Include="_oldfiles\CaoConnector_old.cs" />
<Content Include="_textfiles\CaoInsertFirma.txt" />
<Compile Include="cCao.cs" />
<Compile Include="_Classes\cCao.cs" />
<Compile Include="_oldfiles\CDatabasecon.cs" />
<Compile Include="cSugar.cs" />
<Compile Include="CToolbox.cs" />
<Compile Include="frmMain.cs">
<Compile Include="_Classes\cSugar.cs" />
<Compile Include="_Classes\CToolbox.cs" />
<Compile Include="_Forms\frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<Compile Include="_Forms\frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="frmNeu.cs">
<Compile Include="_oldfiles\frmNeu.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmNeu.Designer.cs">
<Compile Include="_oldfiles\frmNeu.Designer.cs">
<DependentUpon>frmNeu.cs</DependentUpon>
</Compile>
<Compile Include="frmSettings.cs">
<Compile Include="_Forms\frmSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSettings.Designer.cs">
<Compile Include="_Forms\frmSettings.Designer.cs">
<DependentUpon>frmSettings.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmMain.resx">
<EmbeddedResource Include="_Forms\frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmNeu.resx">
<EmbeddedResource Include="_oldfiles\frmNeu.resx">
<DependentUpon>frmNeu.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSettings.resx">
<EmbeddedResource Include="_Forms\frmSettings.resx">
<DependentUpon>frmSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmSuche.resx">
<EmbeddedResource Include="_Forms\frmSuche.resx">
<DependentUpon>frmSuche.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
Expand All @@ -135,10 +135,10 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="frmSuche.cs">
<Compile Include="_Forms\frmSuche.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSuche.Designer.cs">
<Compile Include="_Forms\frmSuche.Designer.cs">
<DependentUpon>frmSuche.cs</DependentUpon>
</Compile>
<Compile Include="_oldfiles\SugarConnector_old.cs" />
Expand Down Expand Up @@ -196,6 +196,7 @@
<Content Include="_textfiles\all_cao_params.txt" />
<None Include="Icons\industry-icon.png" />
<None Include="Icons\User-Administrator-Blue-icon.png" />
<Content Include="_textfiles\hiderows.txt" />
<Content Include="_textfiles\Notes.txt" />
<Content Include="_textfiles\all_sugar_params.txt" />
<Content Include="_textfiles\searchcontactsbyname_sicherung.txt" />
Expand Down
6 changes: 3 additions & 3 deletions Cugar/Cugar/CToolbox.cs → Cugar/Cugar/_Classes/CToolbox.cs
Expand Up @@ -11,7 +11,7 @@ namespace Cugar
/// <summary>
/// Verschiedene Tools und Funktionen
/// </summary>
public class CToolbox
public class cToolbox
{
#region private members
private String m_server;
Expand All @@ -22,10 +22,10 @@ public class CToolbox


#region constructors
public CToolbox()
public cToolbox()
{
}
public CToolbox(string server, string user, string pw, string dbname)
public cToolbox(string server, string user, string pw, string dbname)
{
m_server = server;
m_user = user;
Expand Down
53 changes: 33 additions & 20 deletions Cugar/Cugar/cCao.cs → Cugar/Cugar/_Classes/cCao.cs
Expand Up @@ -9,7 +9,9 @@
namespace Cugar
{
/// <summary>
/// CaoConnector Class
/// SugarConnector Class. Connects to CaoFaktura
/// and works with a referenced DataSet and
/// a referenced BindingSource.
/// </summary>
public class cCao
{
Expand Down Expand Up @@ -42,9 +44,11 @@ public class cCao


/// <summary>
/// Constructor expecting a DataSet
/// Constructor expecting a DataSet.
/// Note: its recommencet to use the one who expects
/// a DataSet AND a Bindingsource!
/// </summary>
/// <param name="ds">DataSet für Referenzierung</param>
/// <param name="ds">Referenced DataSet</param>
public cCao(DataSet ds)
{
m_dsCao = ds;
Expand All @@ -70,10 +74,10 @@ public cCao(DataSet ds)
}

/// <summary>
/// Constructor expecting a DataSet
/// Constructor expecting a DataSet and a Bindingsource.
/// </summary>
/// <param name="bs">Binding Source to reference</param>
/// <param name="ds">DataSet to reference</param>
/// <param name="bs">Referenced BindingSource</param>
public cCao(DataSet ds, BindingSource bs)
{
m_dsCao = ds;
Expand Down Expand Up @@ -101,7 +105,7 @@ public cCao(DataSet ds, BindingSource bs)

#region methods
/// <summary>
/// Builds a Connection to the given CaoHost
/// Builds a Connection to the given Cao Server
/// using the User Settings.
/// </summary>
private void CaoConnect()
Expand All @@ -120,7 +124,7 @@ private void CaoConnect()
}

/// <summary>
/// Loads all private Customers into the referenced DataSet.
/// Loads all private Cao Customers into the referenced DataSet.
/// Using a Tablename "tblCaoPrivate"
/// </summary>
public void LoadPrivateCustomers()
Expand All @@ -139,9 +143,10 @@ public void LoadCaoVersandarten()
OdbcCommand m_cmdCaoVersandarten = new OdbcCommand(@"select NAME from registry where MAINKEY='MAIN\\LIEFART';", m_cnCao);
m_daCao = new OdbcDataAdapter(m_cmdCaoVersandarten);
m_daCao.Fill(m_dsCao, m_const_strCaoVersandarten);
m_BS.DataSource = m_dsCao.Tables[m_const_strCaoVersandarten];
m_BS.DataSource = m_dsCao.Tables[m_const_strCaoVersandarten];
}

#region obsolete
/// <summary>
/// Loads the "Cao Zahlungsarten" into the referenced combobox
/// <param name="cb">a combobox control</param>
Expand Down Expand Up @@ -194,9 +199,11 @@ public void LoadCaoVersandarten()
// dr.Close();
// m_cnFoo.Close();
//}
#endregion obsolete

/// <summary>
/// Loads the "Cao Zahlarten" into the referenced DataSet
/// Table: tblcaoversandarten
/// </summary>
public void LoadCaoZahlarten()
{
Expand All @@ -205,9 +212,9 @@ public void LoadCaoZahlarten()
m_daCao.Fill(m_dsCao, m_const_strCaoZahlarten);
}


/// <summary>
/// Searches for Contacts By Name.</summary>
/// Searches for Contacts By Name.
/// Table: tblCaoSearchAllPrivate</summary>
/// <param name="searchstring">the search string</param>
public void SearchContactsByName(string searchstring)
{
Expand All @@ -224,8 +231,10 @@ public void SearchContactsByName(string searchstring)
m_daCao.FillSchema(m_dsCao, SchemaType.Source, m_const_strCaoTableSearchAllPrivate);
m_daCao.Fill(m_dsCao, m_const_strCaoTableSearchAllPrivate);
}

/// <summary>
/// Searches for Contacts by Street.</summary>
/// Searches for Contacts by Street.
/// Table: tblCaoSearchAllPrivate</summary>
/// <param name="searchstring">the search string</param>
public void SearchContactsBySteet(string searchstring)
{
Expand All @@ -244,7 +253,8 @@ public void SearchContactsBySteet(string searchstring)
}

/// <summary>
/// Searches for Contacts By Mainphone.</summary>
/// Searches for Contacts By Mainphone.
/// Table: tblCaoSearchAllPrivate</summary>
/// <param name="searchstring">the search string</param>
public void SearchContactsByPhone(string searchstring)
{
Expand All @@ -261,6 +271,7 @@ public void SearchContactsByPhone(string searchstring)
m_daCao.FillSchema(m_dsCao, SchemaType.Source, m_const_strCaoTableSearchAllPrivate);
m_daCao.Fill(m_dsCao, m_const_strCaoTableSearchAllPrivate);
}

/// <summary>
///Searches the table adressen for a given Searchstring
///and inserts a "tblCaoSearchHuman" into the DataSet.</summary>
Expand All @@ -283,7 +294,7 @@ public void search_ds_human_persons(string searchstring)

/// <summary>
/// Searches for Companies by Name.
/// </summary>
/// Table: tblCaoSearchAllPrivate</summary>
/// <param name="searchstring">the searchstring</param>
public void SearchCompanyByName(string searchstring)
{
Expand All @@ -299,9 +310,10 @@ public void SearchCompanyByName(string searchstring)
m_daCao.FillSchema(m_dsCao, SchemaType.Source, m_const_strCaoTableSearchAllCompanies);
m_daCao.Fill(m_dsCao, m_const_strCaoTableSearchAllCompanies);
}

/// <summary>
/// Searches for Companies by Street.
/// </summary>
/// Table: tblCaoSearchAllPrivate</summary>
/// <param name="searchstring">the searchstring</param>
public void SearchCompanyByStreet(string searchstring)
{
Expand All @@ -317,9 +329,10 @@ public void SearchCompanyByStreet(string searchstring)
m_daCao.FillSchema(m_dsCao, SchemaType.Source, m_const_strCaoTableSearchAllCompanies);
m_daCao.Fill(m_dsCao, m_const_strCaoTableSearchAllCompanies);
}

/// <summary>
/// Searches for Companies by Mainphone.
/// </summary>
/// Table: tblCaoSearchAllPrivate</summary>
/// <param name="searchstring">the searchstring</param>
public void SearchCompanyByPhone(string searchstring)
{
Expand All @@ -335,6 +348,7 @@ public void SearchCompanyByPhone(string searchstring)
m_daCao.FillSchema(m_dsCao, SchemaType.Source, m_const_strCaoTableSearchAllCompanies);
m_daCao.Fill(m_dsCao, m_const_strCaoTableSearchAllCompanies);
}

/// <summary>
///Updates the Database.
///</summary>
Expand Down Expand Up @@ -671,11 +685,11 @@ public void UpdateAll()
//delete
//OdbcCommand myDeleteCommand = new OdbcCommand("delete from ADRESSEN_LIEF Where ADDR_ID=3;delete from ADRESSEN_TO_MERK Where ADDR_ID=3;DELETE FROM ADRESSEN WHERE REC_ID=3.DeleteCommand = myDeleteCommand;", myConnection);
//myDeleteCommand.Parameters.Add("@fldStudentNr", OleDbType.Integer, 2, "fldStudentNr");
m_daCao.Update(m_dsCao, m_const_strCaoTableSearchAllPrivate);

}
m_daCao.Update(m_dsCao, m_const_strCaoTableSearchAllPrivate);

}

#region obsolete
/// <summary>
/// Creates a New Contact
/// </summary>
Expand All @@ -691,9 +705,8 @@ public void CreateNew(OdbcCommand command)
MessageBox.Show(asdf.ToString());
throw;
}


}
#endregion obsolete

private int GetLatestRecId()
{
Expand Down

0 comments on commit 4ef42d8

Please sign in to comment.