Exemplo n.º 1
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     if (ProdListV.SelectedItems.Count == 1)
     {
         if (ProdListV.SelectedItems[0].SubItems[8].Text != "Paid")
         {
             string refno = string.Empty;
             Transaction.ReceiptConfirmFrm rc = new ReceiptConfirmFrm();
             rc.MdiParent   = MdiParent;
             rc.orderId     = ProdListV.SelectedItems[0].Text;
             refno          = ProdListV.SelectedItems[0].SubItems[1].Text;
             rc.sdate       = ProdListV.SelectedItems[0].SubItems[10].Text;
             rc.totalamount = ProdListV.SelectedItems[0].SubItems[2].Text;
             rc.discount    = ProdListV.SelectedItems[0].SubItems[3].Text;
             rc.gtotal      = ProdListV.SelectedItems[0].SubItems[4].Text;
             Transactions txn = _trn.SelectByRef(refno);
             rc.txn = txn;
             rc.Show();
         }
         else
         {
             MessageBox.Show("Cannot edit paid transaction.");
         }
     }
     else
     {
         MessageBox.Show("Please select an Item");
     }
     loadinformation();
 }
Exemplo n.º 2
0
 private void toolStripButton4_Click(object sender, EventArgs e)
 {
     if (lblcusid.Text != string.Empty)
     {
         //saving orders
         CreateHeader();
         CreateOrder();
         ReceiptConfirmFrm frm = new ReceiptConfirmFrm();
         Transactions      txn = _trn.SelectByRef(lbltxnid.Text);
         frm.sdate       = lbldate.Text;
         frm.orderId     = txn.sales_id.ToString();
         frm.totalamount = lbltotalamounts.Text;
         frm.discount    = txtdiscount.Text;
         frm.gtotal      = lblgrandtotal.Text;
         frm.status      = "Processed";
         frm.txn         = txn;
         frm.ShowDialog();
     }
     else
     {
         MessageBox.Show("Please enter or select a customer.");
     }
 }