update 20250317
This commit is contained in:
@@ -566,6 +566,44 @@ namespace OnDoc.UIControls
|
||||
//System.IO.File.Delete(filename);
|
||||
}
|
||||
|
||||
public void create_new_sb(int dokumenttypnr)
|
||||
{
|
||||
try
|
||||
{
|
||||
panelLoad.Visible = true;
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
this.sb = null;
|
||||
this.sb = new serienbrief();
|
||||
sb.dokumenttypnr = dokumenttypnr;
|
||||
update_serienbrief_details(true, sb.dokumenttypnr, 0);
|
||||
init_empfaenger(-1);
|
||||
//this.cbboxzustaendigmitarbeiter.SelectedValue = AppParams.CurrentMitarbeiter;
|
||||
sb.verantwortlich = AppParams.CurrentMitarbeiter;
|
||||
vorlagenfelder(sb.dokumenttypnr);
|
||||
refresh_empfaenger(sb.dsempfaenger.Tables[0]);
|
||||
update_screen();
|
||||
update_serienbriefdaten(true);
|
||||
|
||||
vorlage_auslesen_und_speichern();
|
||||
|
||||
SerienbriefBearbeitung sbe = new SerienbriefBearbeitung(sb);
|
||||
sb.dsempfaenger.Tables.Add(sbe.init_used_felder(false).Copy());
|
||||
sb.dsempfaenger.Tables[sb.dsempfaenger.Tables.Count - 1].TableName = "UsedFelder";
|
||||
Logging.Logging.Debug("Update Serienbriefdaten", "OnDoc", "");
|
||||
update_serienbriefdaten(false);
|
||||
open_sb(sb.serienbriefnr);
|
||||
treeViewAdv1.Enabled = true;
|
||||
panelLoad.Visible = false;
|
||||
refresh_empfaenger(sb.dsempfaenger.Tables[0]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
panelLoad.Visible = false;
|
||||
Logging.Logging.Debug(ex.Message, "OnDoc", "SB Error");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void RibbonButtonNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -574,6 +612,9 @@ namespace OnDoc.UIControls
|
||||
DokTypSelect.ShowDialog(this);
|
||||
if (DokTypSelect.DialogResult == DialogResult.OK)
|
||||
{
|
||||
create_new_sb(DokTypSelect.dokumenttypnr);
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
panelLoad.Visible = true;
|
||||
@@ -1173,6 +1214,8 @@ namespace OnDoc.UIControls
|
||||
dr["kurzbezeichnung"] = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
|
||||
}
|
||||
db.Get_Tabledata("select dbo.fnkt_check_blkunde(" + ipartnernr.ToString() + ")", false, true);
|
||||
if (Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][0])>0) { dr["BLKUNDE"] = "1"; } else { dr["BLKUNDE"] = "0"; }
|
||||
dr["STATUS"] = 0;
|
||||
dr["FEHLERCODE"] = 0;
|
||||
dr["IntEintragnr"] = lastid;
|
||||
@@ -2608,36 +2651,40 @@ namespace OnDoc.UIControls
|
||||
|
||||
private void sfdatagridsbload_DrawCell(object sender, Syncfusion.WinForms.DataGrid.Events.DrawCellEventArgs e)
|
||||
{
|
||||
if (e.Column.MappingName == "S")
|
||||
try
|
||||
{
|
||||
try
|
||||
if (e.Column.MappingName == "S")
|
||||
{
|
||||
e.Column.CellStyle.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
e.Handled = true;
|
||||
var selectedItem = e.DataRow;
|
||||
var dataRow = (e.DataRow.RowData as DataRowView).Row;
|
||||
try
|
||||
{
|
||||
e.Column.CellStyle.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
e.Handled = true;
|
||||
var selectedItem = e.DataRow;
|
||||
var dataRow = (e.DataRow.RowData as DataRowView).Row;
|
||||
|
||||
if (Convert.ToInt32(dataRow["S"]) == 0)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_ToApprove_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
if (Convert.ToInt32(dataRow["S"]) == 1)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_approved_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
if (Convert.ToInt32(dataRow["S"]) == 2)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
Pen borderPen = new Pen(Color.LightGray);
|
||||
e.Graphics.DrawLine(borderPen, e.Bounds.Right, e.Bounds.Top, e.Bounds.Right, e.Bounds.Bottom);
|
||||
e.Graphics.DrawLine(borderPen, e.Bounds.Left, e.Bounds.Bottom, e.Bounds.Right, e.Bounds.Bottom);
|
||||
return;
|
||||
if (Convert.ToInt32(dataRow["S"]) == 0)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_ToApprove_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
if (Convert.ToInt32(dataRow["S"]) == 1)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_approved_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
if (Convert.ToInt32(dataRow["S"]) == 2)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
Pen borderPen = new Pen(Color.LightGray);
|
||||
e.Graphics.DrawLine(borderPen, e.Bounds.Right, e.Bounds.Top, e.Bounds.Right, e.Bounds.Bottom);
|
||||
e.Graphics.DrawLine(borderPen, e.Bounds.Left, e.Bounds.Bottom, e.Bounds.Right, e.Bounds.Bottom);
|
||||
return;
|
||||
|
||||
}
|
||||
catch { }
|
||||
e.Handled = false;
|
||||
}
|
||||
catch { }
|
||||
e.Handled = false;
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user