update 20241008
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -259,7 +259,7 @@ namespace Database
|
||||
}
|
||||
public DataTable Get_Vorlage_By_DokumentID(string dokumentid)
|
||||
{
|
||||
string sql = "Select dbo.BinaryToBase64(vorlage) as Data, dbo.office_vorlage_datei.office_vorlagenr as nr from dbo.Office_Vorlage_Datei INNER JOIN ";
|
||||
string sql = "Select dbo.BinaryToBase64(vorlage) as Data, dbo.office_vorlage.office_vorlagenr as nr from dbo.Office_Vorlage_Datei INNER JOIN ";
|
||||
sql = sql + " dbo.office_vorlage ON dbo.Office_Vorlage_Datei.office_vorlage_dateinr = dbo.office_vorlage.office_vorlagenr INNER JOIN ";
|
||||
sql = sql + "dbo.dokumenttyp INNER JOIN ";
|
||||
sql = sql + "dbo.dokument ON dbo.dokumenttyp.dokumenttypnr = dbo.dokument.dokumenttypnr ON dbo.office_vorlage.office_vorlagenr = dbo.dokumenttyp.office_vorlagenr ";
|
||||
@@ -300,8 +300,8 @@ namespace Database
|
||||
string sql = "SELECT RIGHT(dbo.anwendung.bezeichnung, CHARINDEX(' ', REVERSE(dbo.anwendung.bezeichnung)) - 1) AS ApplType, ";
|
||||
sql = sql + " RIGHT(dbo.Office_Vorlage_Datei.dateiname, CHARINDEX('.', REVERSE(dbo.Office_Vorlage_Datei.dateiname)) - 1) as Extension";
|
||||
sql = sql + " FROM dbo.office_vorlage INNER JOIN dbo.anwendung ON dbo.office_vorlage.anwendungnr = dbo.anwendung.anwendungnr INNER JOIN";
|
||||
sql = sql + " dbo.Office_Vorlage_Datei ON dbo.office_vorlage.office_vorlagenr = dbo.Office_Vorlage_Datei.office_vorlagenr ";
|
||||
sql = sql + "WHERE dbo.office_vorlage.office_vorlagenr = " + vorlagenr.ToString();
|
||||
sql = sql + " dbo.Office_Vorlage_Datei ON dbo.office_vorlage.office_vorlagenr = dbo.Office_Vorlage_Datei.office_vorlage_dateinr ";
|
||||
sql = sql + " WHERE dbo.office_vorlage.office_vorlagenr = " + vorlagenr.ToString();
|
||||
// string sql = "Select RIGHT(dbo.anwendung.bezeichnung, CHARINDEX(' ', REVERSE(dbo.anwendung.bezeichnung)) - 1) AS Expr1 FROM dbo.office_vorlage INNER JOIN dbo.anwendung ON dbo.office_vorlage.anwendungnr = dbo.anwendung.anwendungnr where dbo.office_vorlage.office_vorlagenr=" + vorlagenr.ToString();
|
||||
Get_Tabledata(sql, false, true);
|
||||
return dsdaten.Tables[0];
|
||||
@@ -459,10 +459,48 @@ namespace Database
|
||||
db.Get_Tabledata("SP_Dokument_Cold_Index_Update", true, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
db.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(db.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(db.dsdaten.Tables[0].Rows[0]["Unterschrift_links"]);
|
||||
int unterschriftrechts = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["Unterschrift_rechts"]);
|
||||
|
||||
if (unterschriftlinks==1 && unterschriftrechts==0 && approved1==1) { approved = 1; }
|
||||
|
||||
db.Exec_SQL("Update dokument set toapprove=" + toapprove.ToString() + ", approved=" + approved.ToString() + ", approval1=" + approved1.ToString() + ", approval2=" + approved2.ToString() + " where dokumentid = '" + dokumentid+"'");
|
||||
|
||||
return dokumentid;
|
||||
}
|
||||
public void set_approvalstate(string dokumentid, bool init = false)
|
||||
{
|
||||
int toapprove = 0;
|
||||
int approved = 0;
|
||||
int approval1 = 0;
|
||||
int approval2 = 0;
|
||||
if (init)
|
||||
{
|
||||
|
||||
}
|
||||
Get_Tabledata("Select * from dokument where dokumentid='" + dokumentid + "'", false, true);
|
||||
if (Convert.ToBoolean(dsdaten.Tables[0].Rows[0]["toapprove"]) == true)
|
||||
{
|
||||
if ( dsdaten.Tables[0].Rows[0]["unterschriftlinks"].ToString()== dsdaten.Tables[0].Rows[0]["ersteller"].ToString()) approval1 = 1;
|
||||
if (dsdaten.Tables[0].Rows[0]["unterschriftrechts"].ToString() == dsdaten.Tables[0].Rows[0]["ersteller"].ToString()) approval2 = 1;
|
||||
if (approval1 != approval2) approved = 0;
|
||||
Exec_SQL("Update dokument set approved=" + approved.ToString() + ", approval1=" + approval1.ToString() + ", approval2=" + approval2.ToString() + " where dokumentid = '" + dokumentid + "'");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public DataTable COLD_Index_Sichern(int indextyp, string dokumentid)
|
||||
{
|
||||
SqlCommand scmCmdToExecute = new SqlCommand();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user