update 20250202
This commit is contained in:
@@ -1501,12 +1501,13 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
try
|
||||
{
|
||||
ribbonLabelToApprove.Text = "";
|
||||
DB db1 = new DB(AppParams.connectionstring);
|
||||
db1.Get_Tabledata("Select count(*) from view_relaunch_approval where bewilligt=0 and abgelehnt = 0 and mitarbeiter_bewilligung=" + AppParams.CurrentMitarbeiter.ToString(), false, true);
|
||||
if (Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]) == 0)
|
||||
{
|
||||
|
||||
ribbonLabelToApprove.Text = "";
|
||||
//ribbonLabelToApprove.Text = "";
|
||||
ribbonLabelToApprove.Visible = false;
|
||||
|
||||
}
|
||||
@@ -1519,7 +1520,7 @@ namespace OnDoc.UICintrols
|
||||
if (Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]) == 0)
|
||||
{
|
||||
|
||||
ribbonLabelToApprove.Text = "";
|
||||
//ribbonLabelToApprove.Text = "";
|
||||
ribbonLabelToApprove.Visible = false;
|
||||
|
||||
}
|
||||
@@ -2356,6 +2357,46 @@ namespace OnDoc.UICintrols
|
||||
|
||||
createnewdoc(this.partnernr, 0);
|
||||
}
|
||||
|
||||
private void dokumentUnterzeichnenToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!row_selected()) return;
|
||||
var records = sfDataGrid1.View.GetSelectedRecords();
|
||||
int error = 0;
|
||||
foreach (var record in records)
|
||||
{
|
||||
var datarow = record as DataRowView;
|
||||
string documentid = datarow["dokumentid"].ToString();
|
||||
string aktion = datarow["aktion"].ToString();
|
||||
if (aktion != "Geprüft/Unterzeichnen") { error = 1; }
|
||||
// dokument_bearbeiten(documentid, false);
|
||||
}
|
||||
if (error > 0)
|
||||
{
|
||||
MessageBox.Show("Nur Dokumente wählen, welche zum Unterzeichnen sind", "Dokumente unterzeichnen", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
if (records.Count > 1)
|
||||
{
|
||||
if (MessageBox.Show("Mehrere Dokumente zum Bearbeiten öffnen?", "Dokument bearbeiten", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) { return; }
|
||||
|
||||
}
|
||||
foreach (var record in records)
|
||||
{
|
||||
var datarow = record as DataRowView;
|
||||
string documentid = datarow["dokumentid"].ToString();
|
||||
DOCGEN.DocGen dg = new DocGen(AppParams.connectionstring,AppParams.RESTURI,AppParams.apikey);
|
||||
if (dg.signdoc(selected_dokumentid, AppParams.tempdir))
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Exec_SQL("Update Dokument set signiert=1, mutierer=" + AppParams.CurrentMitarbeiter.ToString() + ", mutiertam=getdate() where dokumentid='" + documentid + "'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user