update vor Syncfusion-Aktualisierung

This commit is contained in:
Stefan Hutter
2024-09-17 10:20:00 +02:00
parent 3d8d977a04
commit cb21f39e6b
63 changed files with 3660 additions and 196569 deletions

View File

@@ -1037,6 +1037,48 @@ namespace Database
daten.Tables[0].Rows.Add(dr);
Update_Data();
}
public void Insert_Vorlagenfeld(int vorlagenfeldregelnr, int dokumenttypnr, int mitarbeiternr)
{
SqlConnection conn = new SqlConnection(connectionstring);
var scmCmdToExecute = new SqlCommand();
scmCmdToExecute.Connection = conn;
scmCmdToExecute.CommandText = "dbo.[sp_trefferliste_getdata_new_relaunch]";
scmCmdToExecute.CommandType = CommandType.StoredProcedure;
var dtToReturn = new DataTable();
var sdaAdapter = new SqlDataAdapter(scmCmdToExecute);
scmCmdToExecute.Connection.ConnectionString = connectionstring;
var iErrorcode = default(int);
scmCmdToExecute.Connection.Open();
scmCmdToExecute.CommandType = CommandType.StoredProcedure;
scmCmdToExecute.CommandText = "dbo.[sp_vorlagenfeld_insert]";
scmCmdToExecute.Parameters.Add(new SqlParameter("@dokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, dokumenttypnr));
scmCmdToExecute.Parameters.Add(new SqlParameter("@vorlagenfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, vorlagenfeldregelnr));
scmCmdToExecute.Parameters.Add(new SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, mitarbeiternr));
scmCmdToExecute.Parameters.Add(new SqlParameter("@mandantnr", SqlDbType.Int, 4, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, 1));
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, true, 10, 0, "", DataRowVersion.Proposed, iErrorcode));
try
{
scmCmdToExecute.ExecuteNonQuery();
return;
}
catch (Exception ex)
{
throw new Exception("sp_vorlagenfeld_standard_insert:Error occured." + ex.Message, ex);
}
finally
{
scmCmdToExecute.Connection.Close();
scmCmdToExecute.Dispose();
}
scmCmdToExecute.Dispose();
}
}
}