private void btnNew_Click(object sender, EventArgs e) { try { frmVendorEntry fVendor = new frmVendorEntry((int)Constant.Mode.Insert, 0); fVendor.ShowDialog(); LoadList(); btnClear_Click(sender, e); } catch (Exception exc) { Utill.Common.ExceptionLogger.writeException("Vendor", exc.StackTrace); MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception"); } }
private void btnDelete_Click(object sender, EventArgs e) { try { if (dgvVendor.CurrentRow != null) { SetSortedColumns(); frmVendorEntry fVendor = new frmVendorEntry((int)Constant.Mode.Delete, Convert.ToInt64(dgvVendor.CurrentRow.Cells["VendorID"].Value)); fVendor.ShowDialog(); setDefaultGridRecords(sender, e); } } catch (Exception exc) { Utill.Common.ExceptionLogger.writeException("Vendor", exc.StackTrace); MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception"); } }