private void dgvDealerList_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } if (GetSelectedCellText(dgvPersonList, e) == "Details") { PersonForm dealerForm = new PersonForm(_personType, ((PersonBase)dgvPersonList.Rows[e.RowIndex].DataBoundItem).Id); ShowFormAsFixedDialog(this, dealerForm); } else if (GetSelectedCellText(dgvPersonList, e) == "Bills") { BillListForm billListForm = new BillListForm(_personType, ((PersonBase)dgvPersonList.Rows[e.RowIndex].DataBoundItem).Id); ShowFormResizableAsDialog(this, billListForm); } else if (GetSelectedCellText(dgvPersonList, e) == "Select") { if (CallerForm != null && CallerForm.Name != null && CallerForm.Name == "CustomerCartDetailForm") { CustomerCartDetailForm customerBillBreakListForm = (CustomerCartDetailForm)CallerForm; PersonBase person = (PersonBase)dgvPersonList.Rows[e.RowIndex].DataBoundItem; customerBillBreakListForm.OnCustomerNameSelected(person.Id, person.Name); Close(); } } }
internal void OnCustomerBillingFinish() { LoadProductListWithPrice(); customerBillBreakListForm = new CustomerCartDetailForm(); ShowFormInPanel(this, pnlCustomerBillBreakup, customerBillBreakListForm); }