예제 #1
0
        private void Cmb_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox cmb = (ComboBox)sender;

            if (cmb.Text == "Challan")
            {
                string orderID = dgvBills.CurrentRow.Cells["OrderID"].Value.ToString();
                PurchaseChallanEntry frmChallanEntry = new PurchaseChallanEntry(orderID);
                frmChallanEntry.OnClose += GenerateOrderList;
                frmChallanEntry.ShowDialog();
            }
            if (cmb.Text == "Bill")
            {
                string            orderID      = dgvBills.CurrentRow.Cells["OrderID"].Value.ToString();
                PurchaseBillEntry frmbillEntry = new PurchaseBillEntry(PurchaseBillEntry._CameFrom.Order, orderID, "");
                frmbillEntry.OnClose += GenerateOrderList;
                frmbillEntry.ShowDialog();
            }
            if (cmb.Text == "Advance Payment")
            {
                string         orderID           = dgvBills.CurrentRow.Cells["OrderID"].Value.ToString();
                AdvancePayment frmadvancePayment = new AdvancePayment(AdvancePayment._FromWherere.Order, orderID);
                frmadvancePayment.Onclose += GenerateOrderList;
                frmadvancePayment.ShowDialog();
            }
        }
예제 #2
0
 private void dgvSuppliersDetails_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvSuppliersDetails.Columns[e.ColumnIndex].Name == "Action" && e.RowIndex >= 0 && e.ColumnIndex >= 0)
     {
         string         ledgerid       = dgvSuppliersDetails.Rows[e.RowIndex].Cells["ledgerid"].Value.ToString();
         AdvancePayment advancePayment = new AdvancePayment(AdvancePayment._FromWherere.Direct, ledgerid);
         advancePayment.ShowDialog();
     }
 }
예제 #3
0
 private void dgvadvanceReceipt_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
     {
         if (UserTools._IsEdit)
         {
             string         paymentno = dgvadvanceReceipt.Rows[e.RowIndex].Cells["PaymentNo"].Value.ToString();
             AdvancePayment adreceipt = new AdvancePayment(paymentno);
             adreceipt.Onclose += GenerateAdvancePaymentList;
             adreceipt.ShowDialog();
         }
         else
         {
             MessageBox.Show("Permission Denied", "Edit", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         }
     }
 }