update nach anpassungen clsgetdoc
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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.
Binary file not shown.
Reference in New Issue
Block a user