示例#1
0
        private void searchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool flag = true;

            if (txtRecentBatch.Text != "")
            {
                tempRecent.Clear();
                proc.GetDRDetails(txtRecentBatch.Text, tempRecent);
                tempRecent.Clear();
                proc.GetStickerDetails(tempRecent, txtRecentBatch.Text);

                var dBatchtemp = batchTemp.Select(d => d.Batch).Distinct().ToList();

                if (gClient.DataBaseName != "producers_history")
                {
                    foreach (string batch in dBatchtemp)
                    {
                        var _dbatch = batchTemp.Where(r => r.Batch == batch).ToList();
                        _dbatch.ForEach(f =>
                        {
                            if (flag == true)
                            {
                                proc.GetDocStampDetails(docTemp, f.DocStampNumber);
                                flag = false;
                            }
                        });
                    }
                    documentStampToolStripMenuItem.Enabled = true;
                }
                else
                {
                    documentStampToolStripMenuItem.Enabled = false;
                }
                printDRToolStripMenuItem.Enabled = true;
                MessageBox.Show("Batch :" + txtRecentBatch.Text + " has been generated!!!");
            }
            else
            {
                MessageBox.Show("Please enter Batch Number!");
            }
        }
示例#2
0
 private void generateToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (docstamp == null || docstamp.Count == 0)
         {
             proc.UpdateDocstamp(docstamp);
             proc.GetDocStampDetails(docstamp, docstamp[0].DocStampNumber);
             MessageBox.Show("Documetn Stamp has been process!!!");
             ViewReports vp = new ViewReports();
             DeliveryReport.report = "DOC";
             vp.Show();
         }
         else
         {
             MessageBox.Show("No document stamp data!!");
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message, error.Source);
     }
 }