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(); } }
private void btnNewBillEntry_Click(object sender, EventArgs e) { PurchaseBillEntry purchasebillentry = new PurchaseBillEntry(PurchaseBillEntry._CameFrom.PurchaseBill); purchasebillentry.OnClose += GenerateBillingList; purchasebillentry.ShowDialog(); }
private void dgvChallanList_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dgvChallanList.Columns[e.ColumnIndex].Name == "Action" && e.RowIndex != -1) { string challanID = dgvChallanList.CurrentRow.Cells["challanId"].Value.ToString(); string orderid = dgvChallanList.CurrentRow.Cells["Orderid"].Value.ToString(); PurchaseBillEntry objBillEntry = new PurchaseBillEntry(PurchaseBillEntry._CameFrom.Challan, challanID, orderid); objBillEntry.OnClose += GenerateChallanList; objBillEntry.Show(this); } }
private void dgvBills_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgvBills.SelectedCells.Count > 0 && dgvBills.Columns[e.ColumnIndex].Name != "Action" && e.ColumnIndex >= 0 && e.RowIndex >= 0) { if (UserTools._IsEdit) { string billid = dgvBills.CurrentRow.Cells["Billid"].Value.ToString(); string status = dgvBills.CurrentRow.Cells["STATUS"].Value.ToString(); PurchaseBillEntry purchasebillentry = new PurchaseBillEntry(billid, status); purchasebillentry.OnClose += GenerateBillingList; purchasebillentry.ShowDialog(); } else { MessageBox.Show("Edit permission denied by Admin", "Permission", MessageBoxButtons.OK, MessageBoxIcon.Stop); GenerateBillingList(); } } }
private void Cmb_SelectedIndexChanged(object sender, EventArgs e) { ComboBox cmb = (ComboBox)sender; if (cmb.Text == "Bill Payment") { string billid = dgvBills.CurrentRow.Cells["Billid"].Value.ToString(); string supplier = dgvBills.CurrentRow.Cells["Supplier"].Value.ToString(); BillPayment frmReceiptVoucher = new BillPayment(BillPayment._FromWhere.Purchase_Bill, billid, supplier); frmReceiptVoucher.OnClose += GenerateBillingList; frmReceiptVoucher.ShowDialog(); } else if (cmb.Text == "Debit Note") { string billid = dgvBills.CurrentRow.Cells["Billid"].Value.ToString(); CreditNoteIssue creditnoteissu = new CreditNoteIssue(CreditNoteIssue._NoteType.Debit_Note, billid); creditnoteissu.OnClose += GenerateBillingList; creditnoteissu.ShowDialog(); } else if (cmb.Text == "Cancel") { if (UserTools._IsCancel) { string billid = dgvBills.CurrentRow.Cells["Billid"].Value.ToString(); string status = dgvBills.CurrentRow.Cells["STATUS"].Value.ToString(); PurchaseBillEntry purchasebillentry = new PurchaseBillEntry(billid, status); purchasebillentry.CancelBill(status); GenerateBillingList(); } else { MessageBox.Show("Cancel permission denied by Admin.", "Permission", MessageBoxButtons.OK, MessageBoxIcon.Stop); GenerateBillingList(); } } }