update 20241217
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -195,7 +195,7 @@ namespace Database
|
||||
dbkey = "0" + dbkey;
|
||||
}
|
||||
skey = skey + dbkey;
|
||||
s = Helper.DivFnkt.modulo10(dt + dbkey).ToString();
|
||||
s = Helper.DivFnkt.modulo10(skey.Substring(skey.Length-15,15)).ToString();
|
||||
skey = skey + s;
|
||||
return skey;
|
||||
}
|
||||
@@ -1911,7 +1911,7 @@ namespace Database
|
||||
}
|
||||
}
|
||||
|
||||
public bool copydoc(string dokumentid)
|
||||
public string copydoc(string dokumentid, int manr)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1919,12 +1919,85 @@ namespace Database
|
||||
clear_parameter();
|
||||
add_parameter("UrsprungID", dokumentid);
|
||||
add_parameter("NewDokID", newdokumentid);
|
||||
Get_Tabledata("sp_ondoc_copy_doc");
|
||||
|
||||
clsDokument dok = new clsDokument();
|
||||
clsConnectionProvider edoka_conn = new clsConnectionProvider();
|
||||
edoka_conn.sConnectionString = this.connectionstring;
|
||||
dok.cpMainConnectionProvider = edoka_conn;
|
||||
edoka_conn.OpenConnection();
|
||||
dok.sDokumentid = dokumentid;
|
||||
dok.SelectOne();
|
||||
dok.sDokumentid=newdokumentid;
|
||||
dok.daErstelltam = DateTime.Now;
|
||||
dok.daMutiertam = DateTime.Now;
|
||||
dok.iErsteller = manr;
|
||||
dok.iMutierer = manr;
|
||||
dok.Insert();
|
||||
|
||||
COLD_Index_Sichern(1, newdokumentid);
|
||||
if (dok.bZu_retournieren == true)
|
||||
{
|
||||
COLD_Index_Sichern(2, newdokumentid);
|
||||
}
|
||||
Status_Erstellen(newdokumentid, false);
|
||||
dok.iStatusnr = Convert.ToInt32(get_current_Status(newdokumentid).ToString());
|
||||
//edoka_conn.OpenConnection();
|
||||
dok.Update();
|
||||
edoka_conn.CloseConnection(true);
|
||||
|
||||
//Get_Tabledata("Select * from dokumentcoldindexwert where dokumentid='" + dokumentid + "'", false, true);
|
||||
//Get_Tabledata_for_Update("Select * from dokumentcoldindexwert where dokumentid='" + newdokumentid + "'", false, true);
|
||||
//foreach (DataRow dr in dsdaten.Tables[0].Rows)
|
||||
//{
|
||||
// daten.Tables[0].Rows.Add(dr);
|
||||
//}
|
||||
//daten.AcceptChanges();
|
||||
//Update_Data();
|
||||
|
||||
Get_Tabledata("Select * from dokumentcoldindexwert where dokumentid='" + dokumentid + "'", false, true);
|
||||
Get_Tabledata_for_Update("Select * from dokumentcoldindexwert where dokumentid='" + newdokumentid + "'", false, true);
|
||||
foreach (DataRow dr in dsdaten.Tables[0].Rows)
|
||||
{
|
||||
dr["dokumentid"] = newdokumentid;
|
||||
daten.Tables[0].ImportRow(dr);
|
||||
}
|
||||
daten.AcceptChanges();
|
||||
Update_Data();
|
||||
|
||||
Get_Tabledata("Select * from dokumentinfo_wert where dokumentid='" + dokumentid + "'", false, true);
|
||||
Get_Tabledata_for_Update("Select * from dokumentinfo_wert where dokumentid='" + newdokumentid + "'", false, true);
|
||||
foreach (DataRow dr in dsdaten.Tables[0].Rows)
|
||||
{
|
||||
dr["dokumentid"] = newdokumentid;
|
||||
daten.Tables[0].ImportRow(dr);
|
||||
}
|
||||
daten.AcceptChanges();
|
||||
Update_Data();
|
||||
|
||||
Exec_SQL("insert doks (dokumentid, dokument, doktype) select '" + newdokumentid + "', dokument,doktype from doks where dokumentid='" + dokumentid + "'");
|
||||
|
||||
Get_Tabledata("Select * from dokumenttyp where dokumenttypnr=" + dok.iDokumenttypnr.ToString(), false, true);
|
||||
int toapprove = 0;
|
||||
int approved = 0;
|
||||
int approved1 = 0;
|
||||
int approved2 = 0;
|
||||
if (Convert.ToBoolean(dsdaten.Tables[0].Rows[0]["Unterschrift_Pruefung"]) == true)
|
||||
{
|
||||
toapprove = 1;
|
||||
if (dok.iUnterschriftlinks == dok.iErsteller) { approved1 = 1; }
|
||||
if (dok.iUnterschriftrechts == dok.iErsteller) { approved2 = 1; }
|
||||
}
|
||||
int unterschriftlinks = Convert.ToInt32(dsdaten.Tables[0].Rows[0]["Unterschrift_links"]);
|
||||
int unterschriftrechts = Convert.ToInt32(dsdaten.Tables[0].Rows[0]["Unterschrift_rechts"]);
|
||||
int bearbeitung_zwingend = Convert.ToInt32(dsdaten.Tables[0].Rows[0]["bearbeitung_zwingend"]);
|
||||
if (unterschriftlinks == 1 && unterschriftrechts == 0 && approved1 == 1) { approved = 1; }
|
||||
|
||||
Exec_SQL("Update dokument set bearbeitung_zwingend = " + bearbeitung_zwingend.ToString() + ", toapprove=" + toapprove.ToString() + ", approved=" + approved.ToString() + ", approval1=" + approved1.ToString() + ", approval2=" + approved2.ToString() + " where dokumentid = '" + newdokumentid + "'");
|
||||
|
||||
return newdokumentid;
|
||||
}
|
||||
catch{ }
|
||||
return true;
|
||||
catch { return ""; }
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user