update nach anpassungen clsgetdoc

This commit is contained in:
Stefan Hutter committed 2024-06-01 21:43:57 +02:00
1 parent 511a741857
commit f22627a1a8
571 files changed
+3770600 -117

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18 -6
View File
@@ -40,6 +40,7 @@ namespace EDOKA_Database
SqlConnection sqlconnect = new SqlConnection();
DataSet ds = new DataSet();
ds.Tables.Clear();
dsdaten.Tables.Clear();
sqlconnect.ConnectionString = connectionstring;
@@ -514,26 +515,37 @@ namespace EDOKA_Database
}
}
public string GetDocumentAsBase64(string dokumentid)
public clsdok GetDocumentAsBase64(string dokumentid)
{
try
{
string sql = "Select dbo.BinaryToBase64(dokument) as Data from doks ";
string sql = "Select dbo.BinaryToBase64(dokument) as Data, isnull(doktype,'') as doktype from doks ";
sql = sql + "WHERE dbo.doks.dokumentid = '" + dokumentid + "' ";
sql = "Select * from View_Get_Base64Doc where dokumentid='" + dokumentid + "' ";
Get_Tabledata(sql, false, true);
if (dsdaten.Tables[0].Rows.Count > 0)
if (dsdaten.Tables[0].Rows.Count < 1)
{
return dsdaten.Tables[0].Rows[0][0].ToString();
return new clsdok("", "", "");
}
else
{
return "";
if (dsdaten.Tables[0].Rows[0][1].ToString()=="")
{
try
{
dsdaten.Tables[0].Rows[0][1] = dsdaten.Tables[0].Rows[0][2].ToString().Substring(0, 1).ToUpper();
}
catch { }
}
return new clsdok(dsdaten.Tables[0].Rows[0][0].ToString(), dsdaten.Tables[0].Rows[0][1].ToString(), dsdaten.Tables[0].Rows[0][2].ToString());
}
}
catch
{
return "";
return new clsdok("","","");
}
finally
Binary file not shown.
Binary file not shown.