private void dgvBillList_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } int selectedBillId = ((BillReport)dgvBillList.Rows[e.RowIndex].DataBoundItem).Id; if (_personType == PersonBase.DEALER) { if (GetSelectedCellText(dgvBillList, e) == "Details") { OpenDealerBillForm(selectedBillId); } else if (GetSelectedCellText(dgvBillList, e) == "Breakups") { DealerBillBreakupListForm billBreakupForm = new DealerBillBreakupListForm(selectedBillId); ShowFormResizableAsDialog(this, billBreakupForm); } } else if (_personType == PersonBase.CUSTOMER) { if (GetSelectedCellText(dgvBillList, e) == "Details") { CustomerBillBreakupListForm customerBillBreakupListForm = new CustomerBillBreakupListForm(selectedBillId); ShowFormResizableAsDialog(this, customerBillBreakupListForm); } else if (GetSelectedCellText(dgvBillList, e) == "Breakups") { CustomerBillBreakupListForm billBreakupForm = new CustomerBillBreakupListForm(selectedBillId); ShowFormResizableAsDialog(this, billBreakupForm); } } }
private void dgvBillList_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } selectedBillId = ((Bill)dgvBillList.Rows[e.RowIndex].DataBoundItem).Id; if (GetSelectedCellText(dgvBillList, e) == "Details") { DealerBillForm billForm = new DealerBillForm(); billForm.DealerId = selectedePerson.Id; billForm.BILL_ID = selectedBillId; ShowFormAsFixedDialog(this, billForm); } else if (GetSelectedCellText(dgvBillList, e) == "Add Breakups") { DealerBillBreakupListForm billBreakupForm = new DealerBillBreakupListForm(); billBreakupForm.DEALER_BILL_ID = selectedBillId; ShowFormResizableAsDialog(this, billBreakupForm); } }