update 20250226
This commit is contained in:
@@ -1074,6 +1074,8 @@ namespace OnDoc.UICintrols
|
||||
|
||||
private void RibbonButtonZuweisen_Click(object sender, EventArgs e)
|
||||
{
|
||||
var records = sfDataGrid1.View.GetSelectedRecords();
|
||||
if (records.Count < 1) { return; }
|
||||
|
||||
if (!row_selected()) return;
|
||||
InputDialog ma = new InputDialog(true, "Verantwortlichkeit wechseln zu","Verantwortlichkeit zuweisen");
|
||||
@@ -1081,11 +1083,20 @@ namespace OnDoc.UICintrols
|
||||
if (ma.DialogResult == DialogResult.OK)
|
||||
{
|
||||
DB dB = new DB(AppParams.connectionstring);
|
||||
dB.Exec_SQL("Update dokument set verantwortlich=" + ma.result + " where dokumentid = '" + selected_dokumentid + "'");
|
||||
dB = null;
|
||||
Logging.DocLog.Info("Verantwortung zugewiesen auf " + ma.result.ToString(), "Doklist", selected_dokumentid, selected_partnernr, "Verantwortung zugewiesen");
|
||||
clsMailer mailer = new clsMailer();
|
||||
mailer.sendmail(102, ma.result, "", "", selected_dokumentid, "",AppParams.CurrentMitarbeiter.ToString(),"");
|
||||
|
||||
foreach (var record in records)
|
||||
{
|
||||
|
||||
|
||||
var datarow = record as DataRowView;
|
||||
string documentid = datarow["dokumentid"].ToString();
|
||||
dB.Exec_SQL("Update dokument set verantwortlich=" + ma.result + " where dokumentid = '" + documentid + "'");
|
||||
Logging.DocLog.Info("Verantwortung zugewiesen auf " + ma.result.ToString(), "Doklist", documentid, selected_partnernr, "Verantwortung zugewiesen");
|
||||
mailer.sendmail(102, ma.result, "", "", selected_dokumentid, "", AppParams.CurrentMitarbeiter.ToString(), "");
|
||||
|
||||
}
|
||||
dB = null;
|
||||
|
||||
refresh_dokumente();
|
||||
}
|
||||
@@ -1619,20 +1630,11 @@ namespace OnDoc.UICintrols
|
||||
ribbonLabelToApprove.Visible = false;
|
||||
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.Visible = false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ribbonLabelToApprove.Text = db1.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
ribbonLabelToApprove.Visible = true;
|
||||
}
|
||||
int approval = Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
|
||||
db1.Get_Tabledata("Select count(*) from view_relaunch_approval_serienbrief 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)
|
||||
approval = approval + Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
|
||||
|
||||
if (approval == 0)
|
||||
{
|
||||
|
||||
//ribbonLabelToApprove.Text = "";
|
||||
@@ -1641,7 +1643,7 @@ namespace OnDoc.UICintrols
|
||||
}
|
||||
else
|
||||
{
|
||||
ribbonLabelToApprove.Text = db1.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
ribbonLabelToApprove.Text = approval.ToString();
|
||||
ribbonLabelToApprove.Visible = true;
|
||||
}
|
||||
db1 = null;
|
||||
|
||||
Reference in New Issue
Block a user