update 20240927
This commit is contained in:
@@ -27,6 +27,8 @@ namespace OnDoc.DocMgmt
|
||||
public string showdoc { get; set; } = "";
|
||||
|
||||
public int DocFunction = 0;
|
||||
public bool interop { get; set; } = false;
|
||||
public bool runmacros { get; set; } = false;
|
||||
public string dokumentid = "";
|
||||
|
||||
public Dokumenterstellung()
|
||||
@@ -68,7 +70,10 @@ namespace OnDoc.DocMgmt
|
||||
Dokument_Erstellen();
|
||||
}
|
||||
public void Dokument_Erstellen()
|
||||
{
|
||||
{
|
||||
if (ucAllgemeineDokumentParam1.check_fields()==false) {
|
||||
MessageBox.Show(ucAllgemeineDokumentParam1.check_error);
|
||||
return; };
|
||||
ucAllgemeineDokumentParam1.Update_DocGenData();
|
||||
clsDocData dokdata = new clsDocData();
|
||||
ucAllgemeineDokumentParam1.update_dokdata(ref dokdata);
|
||||
@@ -83,6 +88,8 @@ namespace OnDoc.DocMgmt
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
||||
|
||||
interop = ucAllgemeineDokumentParam1.interop;
|
||||
|
||||
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
|
||||
{
|
||||
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
@@ -90,10 +97,21 @@ namespace OnDoc.DocMgmt
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Save_To_DB(dokdata.Dokumentid, filename);
|
||||
db = null;
|
||||
DocFunction = 1;
|
||||
|
||||
System.Diagnostics.Process.Start("winword.exe", filename);
|
||||
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
|
||||
|
||||
//if (dok.extension.Substring(0,1).ToUpper() == "D") { System.Diagnostics.Process.Start("winword.exe", filename); }
|
||||
//if (dok.extension.Substring(0, 1).ToUpper() == "X") { System.Diagnostics.Process.Start("excel.exe", filename); }
|
||||
//clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentPreview)
|
||||
{
|
||||
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Save_To_DB(dokdata.Dokumentid, filename);
|
||||
db = null;
|
||||
}
|
||||
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF)
|
||||
{
|
||||
@@ -135,7 +153,7 @@ namespace OnDoc.DocMgmt
|
||||
button5.Enabled = true;
|
||||
}
|
||||
if (ucAllgemeineDokumentParam1.docgendata.versandstrasse_moeglich == false) { button5.Enabled = false; }
|
||||
docPreview1.Show_Doc(dokumentid);
|
||||
docPreview1.Show_Doc(dokumentid);
|
||||
docPreview1.Hide_Editbuttons();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
using Database;
|
||||
using OnDoc.UIControls;
|
||||
|
||||
namespace OnDoc.DocMgmt
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OnDoc.UICintrols
|
||||
where = "and bezeichnung like '%" + filter.Replace(" ", "%") + "%'";
|
||||
}
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select dokumenttypnr as id, bezeichnung from dokumenttyp where aktiv=1 "+where+" order by bezeichnung",false,true);
|
||||
db.Get_Tabledata("Select distinct dokumenttypnr as id, bezeichnung from dokumenttyp where aktiv=1 "+where+" order by bezeichnung",false,true);
|
||||
sfListView1.DataSource = db.dsdaten.Tables[0];
|
||||
sfListView1.DisplayMember = "bezeichnung";
|
||||
sfListView1.ValueMember = "id";
|
||||
|
||||
Reference in New Issue
Block a user