update 20250420
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OnDoc.Versandstrasse
|
||||
private TreeViewAdvDragHighlightTracker treeViewDragHighlightTracker = null;
|
||||
private TreeNodeAdv currentSourceNode;
|
||||
private bool serienbrief = false;
|
||||
private serienbrief sb;
|
||||
public serienbrief sb;
|
||||
private bool direktversenden = false;
|
||||
public Versandstrasse(List<Versandpaket> pakete)
|
||||
{
|
||||
@@ -120,6 +120,25 @@ namespace OnDoc.Versandstrasse
|
||||
this.pnlpostkorb.Visible = false;
|
||||
this.pnlpostkorb.Dock = DockStyle.Fill;
|
||||
this.pnlcouvert.Dock = DockStyle.Fill;
|
||||
panelPrepare.Left = this.Width - this.panelPrepare.Width;
|
||||
lblprueftext.MaximumSize = new Size(panelVerify.Width-10, 50);
|
||||
lblprueftextSB.MaximumSize = new Size(panelVerify.Width-10, 50);
|
||||
lblprueftextsb2.MaximumSize = new Size(panelVerify.Width-10, 50);
|
||||
|
||||
lblpostausgang.MaximumSize = new Size(500, 60);
|
||||
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select * from OnDoc_Versandstrasse_Texte order by id",false,true);
|
||||
lblprueftext.Text = db.dsdaten.Tables[0].Rows[0]["textblock"].ToString();
|
||||
lblprueftextSB.Text = db.dsdaten.Tables[0].Rows[1]["textblock"].ToString();
|
||||
lblprueftextsb2.Text = db.dsdaten.Tables[0].Rows[2]["textblock"].ToString();
|
||||
lblpostausgang.Text = db.dsdaten.Tables[0].Rows[3]["textblock"].ToString();
|
||||
db = null;
|
||||
|
||||
//lblprueftext.Text = "Prüfe die Angaben und das PDF. Mit Klick auf «Couvert in Postausgang legen» wird das Couvert im Postausgang bereitgelegt. Der Versand vom Postausgang erfolgt um 15.45 Uhr. Bis 15.45 Uhr kann das Couvert noch geöffnet/bearbeitet oder gelöscht werden.";
|
||||
//lblprueftextSB.MaximumSize = new Size(panelVerify.Width, 50);
|
||||
//lblprueftextSB.Text = "Prüfe die Angaben und das PDF. Mit Klick auf «Couvert in Postausgang legen» wird das Couvert im Postausgang bereitgelegt. Der Versand vom Postausgang erfolgt um 15.45 Uhr. Bis 15.45 Uhr kann das Couvert noch geöffnet/bearbeitet oder gelöscht werden.";
|
||||
|
||||
}
|
||||
private void Reload_Tree()
|
||||
{
|
||||
@@ -605,6 +624,7 @@ namespace OnDoc.Versandstrasse
|
||||
panelVerify.Visible = true;
|
||||
this.txtAnzahlSeiten.Text = pdfViewerControl1.PageCount.ToString();
|
||||
this.txtAnzahlDokumente.Text = paket.Dokument.Count().ToString();
|
||||
lblprieveiwbezeichnung.Text = "Aufbereitetes PDF";
|
||||
}
|
||||
catch { }
|
||||
panelPrepare.Visible = false;
|
||||
@@ -646,6 +666,7 @@ namespace OnDoc.Versandstrasse
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtadresse.Text = "";
|
||||
treeViewAdvAdresse.Enabled = false;
|
||||
Versandpaket vp = treeViewAdv1.SelectedNode.TagObject as Versandpaket;
|
||||
vp.GAS = "";
|
||||
@@ -686,6 +707,7 @@ namespace OnDoc.Versandstrasse
|
||||
svp.bemerkung = vd.DokumentID +" / " + sb.serienbriefnr.ToString() + "_" + _newDataTable.Rows[0]["inteintragnr"].ToString();
|
||||
svp.Dokument.Clear();
|
||||
svp.Dokument.Add(vd);
|
||||
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
//db.clear_parameter();
|
||||
//db.add_parameter("@tgnummer", AppParams.currenttgnummer);
|
||||
@@ -696,11 +718,20 @@ namespace OnDoc.Versandstrasse
|
||||
//db.Get_Tabledata("Ondoc_Insert_Versandprotokoll", true, false);
|
||||
//svp.protokollid = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][0]);
|
||||
db = null;
|
||||
|
||||
this.progressBarAdv1.Value = this.progressBarAdv1.Value + 1;
|
||||
send_vs(ref svp, false);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
sb.status = 1;
|
||||
|
||||
pdfViewerControl1.Unload();
|
||||
lblprieveiwbezeichnung.Text = "";
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
panelVerify.Visible = false;
|
||||
@@ -721,6 +752,7 @@ namespace OnDoc.Versandstrasse
|
||||
|
||||
SendTo_Versandstrasse();
|
||||
pdfViewerControl1.Unload();
|
||||
lblprieveiwbezeichnung.Text = "";
|
||||
vdl = null;
|
||||
vp = null;
|
||||
}
|
||||
@@ -953,6 +985,7 @@ namespace OnDoc.Versandstrasse
|
||||
if (ribbonButtonDokPreview.Checked)
|
||||
{
|
||||
clsVersandstrasse vs = new clsVersandstrasse();
|
||||
lblprieveiwbezeichnung.Text = node.Text;
|
||||
string dok = "";
|
||||
if (serienbrief)
|
||||
{
|
||||
@@ -1030,26 +1063,38 @@ namespace OnDoc.Versandstrasse
|
||||
|
||||
private void treeViewAdvCouverts_AfterSelect(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
TreeNodeAdv node = treeViewAdvCouverts.SelectedNode;
|
||||
if (this.ribbonbuttondokpreviewpostkorb.Checked)
|
||||
if (node.Level == 1)
|
||||
{
|
||||
var stream = new MemoryStream(Convert.FromBase64String(node.TagObject.ToString()));
|
||||
this.pdfViewerControl2.Load(stream);
|
||||
stream = null;
|
||||
if (this.ribbonbuttondokpreviewpostkorb.Checked)
|
||||
{
|
||||
var stream = new MemoryStream(Convert.FromBase64String(node.TagObject.ToString()));
|
||||
this.pdfViewerControl2.Load(stream);
|
||||
stream = null;
|
||||
}
|
||||
if (node.Level == 1)
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where id=" + node.Tag.ToString(), false, true);
|
||||
Versandpaket vp = JsonConvert.DeserializeObject<Versandpaket>(db.dsdaten.Tables[0].Rows[0]["paket"].ToString());
|
||||
|
||||
db = null;
|
||||
this.textBox4.Text = this.pdfViewerControl2.PageCount.ToString();
|
||||
this.textBox3.Text = node.Nodes.Count.ToString();
|
||||
this.textBox2.Text = vp.Versandoption;
|
||||
this.textBox1.Text = vp.GASAdresse.Replace(";", Environment.NewLine);
|
||||
}
|
||||
}
|
||||
if (node.Level==1)
|
||||
else
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where id=" + node.Tag.ToString(), false, true);
|
||||
Versandpaket vp = JsonConvert.DeserializeObject<Versandpaket>(db.dsdaten.Tables[0].Rows[0]["paket"].ToString());
|
||||
|
||||
db = null;
|
||||
this.textBox4.Text = this.pdfViewerControl2.PageCount.ToString();
|
||||
this.textBox3.Text = node.Nodes.Count.ToString();
|
||||
this.textBox2.Text = vp.Versandoption;
|
||||
this.textBox1.Text = vp.GASAdresse;
|
||||
this.textBox4.Text = "";
|
||||
this.textBox3.Text = "";
|
||||
this.textBox2.Text = "";
|
||||
this.textBox1.Text = "";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1066,6 +1111,7 @@ namespace OnDoc.Versandstrasse
|
||||
}
|
||||
db = null;
|
||||
pdfViewerControl2.Unload();
|
||||
lblprieveiwbezeichnung.Text = "";
|
||||
Refresh_VersandCouverts();
|
||||
|
||||
}
|
||||
@@ -1087,6 +1133,7 @@ namespace OnDoc.Versandstrasse
|
||||
db = null;
|
||||
treeViewAdvCouverts.Nodes.Remove(treeViewAdvCouverts.SelectedNode);
|
||||
pdfViewerControl2.Unload();
|
||||
lblprieveiwbezeichnung.Text = "";
|
||||
Reload_Tree();
|
||||
ribbon1.TabIndex = 0;
|
||||
|
||||
@@ -1150,9 +1197,16 @@ namespace OnDoc.Versandstrasse
|
||||
private void btnsendserienbrief_Click(object sender, EventArgs e)
|
||||
{
|
||||
direktversenden = true;
|
||||
this.pnlprogress.Visible = true;
|
||||
this.progressBarAdv1.Minimum = 0;
|
||||
this.progressBarAdv1.Value = 0;
|
||||
this.progressBarAdv1.Maximum = treeViewAdv1.SelectedNode.Nodes.Count;
|
||||
Application.DoEvents();
|
||||
btnSendFinal_Click(sender, e);
|
||||
|
||||
direktversenden = false;
|
||||
this.panelverifysb.Visible = false;
|
||||
this.pnlprogress.Visible = false;
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
@@ -1199,6 +1253,7 @@ namespace OnDoc.Versandstrasse
|
||||
{
|
||||
if (this.ribbonTab1.Active)
|
||||
{
|
||||
this.lblpostausgang.Visible = false;
|
||||
this.pnlcouvert.Visible = true;
|
||||
this.pnlcouvert.Dock= DockStyle.Fill;
|
||||
this.pnlpostkorb.Visible = false;
|
||||
@@ -1209,6 +1264,8 @@ namespace OnDoc.Versandstrasse
|
||||
{
|
||||
if (this.ribbonTab2.Active)
|
||||
{
|
||||
this.lblpostausgang.Visible = true;
|
||||
this.lblpostausgang.Left = this.Width-lblpostausgang.Width;
|
||||
this.pnlcouvert.Visible = false;
|
||||
|
||||
this.pnlpostkorb.Visible = true;
|
||||
@@ -1223,10 +1280,12 @@ namespace OnDoc.Versandstrasse
|
||||
{
|
||||
this.ribbonButtonDokPreview.Checked = false;
|
||||
this.pdfViewerControl1.Unload();
|
||||
lblprieveiwbezeichnung.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ribbonButtonDokPreview.Checked = true;
|
||||
|
||||
treeViewAdv1_AfterSelect(sender, e);
|
||||
}
|
||||
}
|
||||
@@ -1247,6 +1306,7 @@ namespace OnDoc.Versandstrasse
|
||||
{
|
||||
ribbonbuttondokpreviewpostkorb.Checked = false;
|
||||
this.pdfViewerControl2.Unload();
|
||||
lblprieveiwbezeichnung.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1258,6 +1318,7 @@ namespace OnDoc.Versandstrasse
|
||||
private void Versandstrasse_Resize(object sender, EventArgs e)
|
||||
{
|
||||
this.treeViewAdvCouverts.Height = this.Height - this.ribbon1.Height-this.grpCouvertDetails.Height;
|
||||
panelPrepare.Left = this.Width - this.panelPrepare.Width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user