private void bttn_Edit_Click(object sender, EventArgs e) { string BillNo = dgv_Bill.Rows[dgv_Bill.CurrentRow.Index].Cells["BillNo"].Value.ToString(); string type = dgv_Bill.Rows[dgv_Bill.CurrentRow.Index].Cells["Type"].Value.ToString(); string SrNo = dgv_Bill.Rows[dgv_Bill.CurrentRow.Index].Cells["SrNo"].Value.ToString(); _sale.DeleteBillRecord(SrNo, BillNo); try { if (type == "GST") { frm_SaleForm _form = new frm_SaleForm(BillNo, "Deleted"); _form.ShowDialog(); } if (type == "Estimate") { frm_SaleEstimate _form = new frm_SaleEstimate(BillNo, "Deleted"); _form.ShowDialog(); } } catch (Exception ex) { _error.AddException(ex, "ChangeBill"); MessageBox.Show(ex.Message); } }
private void bttn_print_Click(object sender, EventArgs e) { try { if (txt_type.Text == "GST") { frm_SaleForm _form = new frm_SaleForm(bill.Text, "Update"); _form.ShowDialog(); } if (txt_type.Text == "Estimate") { frm_SaleEstimate _form = new frm_SaleEstimate(bill.Text, "Update"); _form.ShowDialog(); } } catch (Exception ex) { _error.AddException(ex, "ChangeBill"); MessageBox.Show(ex.Message); } //_s.PrintBillThermal(cmb_BillNo.Text); }