update 20241225
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1862,6 +1862,57 @@ namespace Database
|
||||
|
||||
}
|
||||
|
||||
public bool save_edkdata(string filename,string tgnummer)
|
||||
{
|
||||
try
|
||||
{
|
||||
SqlConnection Connection = new SqlConnection();
|
||||
SqlDataAdapter DA = new SqlDataAdapter("select * from edk_data where rowid=-1 ", Connection);
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder(DA);
|
||||
DataSet ds = new DataSet();
|
||||
FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);
|
||||
byte[] mydata = new byte[fs.Length];
|
||||
try
|
||||
{
|
||||
fs.Read(mydata, 0, Convert.ToInt32(fs.Length));
|
||||
fs.Close();
|
||||
Connection.ConnectionString = connectionstring;
|
||||
Connection.Open();
|
||||
DA.Fill(ds, "edk_data");
|
||||
DataRow myRow;
|
||||
if (ds.Tables[0].Rows.Count == 0)
|
||||
{
|
||||
myRow = ds.Tables[0].NewRow();
|
||||
myRow[1] = tgnummer;
|
||||
myRow[2] = DateTime.Now;
|
||||
myRow[3] = "0";
|
||||
myRow[4] = DateTime.Now;
|
||||
myRow[5] = mydata;
|
||||
ds.Tables[0].Rows.Add(myRow);
|
||||
DA.Update(ds, "edk_data");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
fs = null;
|
||||
cb = null;
|
||||
ds = null;
|
||||
DA = null;
|
||||
Connection.Close();
|
||||
Connection = null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception EX)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public Boolean save_edk(string filename, int mitarbeiternr)
|
||||
{
|
||||
try
|
||||
@@ -2001,6 +2052,7 @@ namespace Database
|
||||
catch { return ""; }
|
||||
//return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user