update 20260308
This commit is contained in:
@@ -1251,7 +1251,7 @@ namespace API_NetFramework.Controllers
|
||||
clsdok dok = new clsdok("", "", "", "");
|
||||
Logging.APIDocLog.Debug("Start GenDocCLM", "CreateCLM", guid, "");
|
||||
|
||||
gendocCLM(ref dokumentdaten, ref dataj, ref dok, key, clmdokumentid,archivstatus);
|
||||
gendocCLM(ref dokumentdaten, ref dataj, ref dok, key, clmdokumentid,archivstatus, result);
|
||||
|
||||
Logging.APIDocLog.Info("Dokument abgeschlossen", "CreateDok", guid, clmdokumentid);
|
||||
apiok.code = "200";
|
||||
@@ -1774,7 +1774,7 @@ namespace API_NetFramework.Controllers
|
||||
|
||||
|
||||
}
|
||||
private void gendocCLM(ref List<CLMDocItem> clmdocitemlist, ref dynamic dataj, ref clsdok dok, string key, string clmdokumentid, string archivstatus = "Aktiv")
|
||||
private void gendocCLM(ref List<CLMDocItem> clmdocitemlist, ref dynamic dataj, ref clsdok dok, string key, string clmdokumentid, string archivstatus = "Aktiv",string json="")
|
||||
{
|
||||
string OwnHost = System.Configuration.ConfigurationManager.AppSettings["OwnHost"].ToString();
|
||||
string imagepath = System.Configuration.ConfigurationManager.AppSettings["VSImagePath"].ToString();
|
||||
@@ -1947,7 +1947,7 @@ namespace API_NetFramework.Controllers
|
||||
db.Exec_SQL("update dokument set dokumentname = dokumentname + '.pdf' where dokumentid = '" + dokumentid + "'");
|
||||
}
|
||||
// db.Save_To_DB(dokumentid, "", dok.dokument);
|
||||
|
||||
|
||||
|
||||
// dok = dget.GetDocAsPDF(dokumentid);
|
||||
dok.extension = "pdf";
|
||||
@@ -1955,11 +1955,25 @@ namespace API_NetFramework.Controllers
|
||||
if (System.Configuration.ConfigurationManager.AppSettings["CLMSaveOnDoc"].ToString() == "True" || clmdokumentid != "")
|
||||
{
|
||||
db.Save_To_DB(dokumentid, "", dok.dokument);
|
||||
string sql = "delete from ondoc_clm_dokumente where clmdokumentid ='" + dataj.Id + "'";
|
||||
db.Exec_SQL(sql);
|
||||
sql = "Insert OnDoc_CLM_Dokumente (dokumentid,clmdokumentid,erstellt_am,aktiv,archivstatus) values(";
|
||||
sql=sql+"'"+dokumentid+"','"+dataj.Id+"',getdate(),1,'"+archivstatus+"')";
|
||||
string sql = "Update ondoc_clm_dokumente set aktiv=0 where clmdokumentid = '" + dataj.Id + "'";
|
||||
db.Exec_SQL(sql);
|
||||
db.Get_Tabledata_for_Update("Select top 1 * from ondoc_clm_dokumente where id=-1", false, true);
|
||||
DataRow dr1 = db.daten.Tables[0].NewRow();
|
||||
dr1[1] = dokumentid;
|
||||
dr1[2] = dataj.Id;
|
||||
dr1[3] = DateTime.Now.ToString();
|
||||
dr1[4] = true;
|
||||
dr1[5] = archivstatus;
|
||||
dr1[6] = 0;
|
||||
dr1[7] = json;
|
||||
dr1[8] = guid;
|
||||
db.daten.Tables[0].Rows.Add(dr1);
|
||||
|
||||
db.Update_Data();
|
||||
dr1 = null;
|
||||
//sql = "Insert OnDoc_CLM_Dokumente (dokumentid,clmdokumentid,erstellt_am,aktiv,archivstatus) values(";
|
||||
//sql=sql+"'"+dokumentid+"','"+dataj.Id+"',getdate(),1,'"+archivstatus+"')";
|
||||
//db.Exec_SQL(sql);
|
||||
//string sql = "Insert OnDoc_CLM_DocReference ";
|
||||
//sql = sql + "(ondocdokumentid, clmdokumentid, erstellt_am,aktiv) ";
|
||||
//sql = sql + "values('"+ dokdata.Dokumentid+","
|
||||
|
||||
Reference in New Issue
Block a user