Update 1.0.0.27 - Entwicklung

This commit is contained in:
2021-04-21 19:05:27 +02:00
parent f1fc04d0b1
commit 3ac556e480
43 changed files with 3261 additions and 101567 deletions

View File

@@ -422,11 +422,10 @@ public class clsDB
}
public void truncate_table(string tablename)
{
SqlConnection myConnection = new SqlConnection(this.Connectionstring);
SqlCommand myCommand = new SqlCommand("truncate table " + tablename,myConnection);
SqlCommand myCommand = new SqlCommand("truncate table " + tablename, myConnection);
myCommand.CommandType = CommandType.Text;
try
{
@@ -444,6 +443,31 @@ public class clsDB
}
}
public void migrate_taf_resultate(string ortnr, string deldata)
{
SqlConnection myConnection = new SqlConnection(this.Connectionstring);
SqlCommand myCommand = new SqlCommand("[dbo].[Migrate_TAF_Import]", myConnection);
if (deldata == "False") ortnr = "0";
myCommand.Parameters.Add(new SqlParameter("@ortnr", SqlDbType.Int, 3, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, ortnr));
myCommand.CommandType = CommandType.StoredProcedure;
try
{
myConnection.Open();
myCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
}
finally
{
if (myConnection.State == ConnectionState.Open)
myConnection.Close();
}
}
public void update_verein(string targetfolder)
{
truncate_table("base_account");
@@ -601,6 +625,57 @@ public class clsDB
}
}
}
public DataSet Get_Reportdata(string Orte, string U1012, string erdgas, string vierkampf, int ortnr)
{
SqlConnection myConnection = new SqlConnection(this.Connectionstring);
SqlCommand myCommand = new SqlCommand("dbo.res_resultate_aufbereiten", myConnection);
myCommand.Parameters.Add("@orte", SqlDbType.VarChar, 1024);
myCommand.Parameters.Add("@U10U12", SqlDbType.VarChar, 1);
if (vierkampf == "J")
{
myCommand.Parameters.Add("@resqw", SqlDbType.Int, 4);
myCommand.Parameters.Add("@resew", SqlDbType.Int, 4);
myCommand.Parameters.Add("@resortnr", SqlDbType.Int, 4);
myCommand.Parameters[4].Value = ortnr;
myCommand.Parameters[3].Value = 0;
myCommand.Parameters[2].Value = 1;
}
if (erdgas == "J")
{
myCommand.Parameters.Add("@resqw", SqlDbType.Int, 4);
myCommand.Parameters.Add("@resew", SqlDbType.Int, 4);
myCommand.Parameters.Add("@resortnr", SqlDbType.Int, 4);
myCommand.Parameters[4].Value = ortnr;
myCommand.Parameters[2].Value = 1;
myCommand.Parameters[1].Value = 0;
}
myCommand.Parameters[0].Value = Orte;
myCommand.Parameters[1].Value = U1012;
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.CommandTimeout = 600;
SqlDataAdapter da = new SqlDataAdapter(myCommand);
try
{
myConnection.Open();
da.Fill(dsdaten, "Daten");
//myCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
}
finally
{
if (myConnection.State == ConnectionState.Open)
myConnection.Close();
}
return dsdaten;
}