Exemple #1
0
 private void btnEditCountry_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvCountry.CurrentRow != null)
         {
             CountrySetSortedColumns();
             frmCountryEntry fCountry = new frmCountryEntry((int)Common.Constant.Mode.Modify, (Int64)dgvCountry.CurrentRow.Cells["CountryID"].Value);
             fCountry.ShowDialog();
             CountrysetDefaultGridRecords(sender, e);
         }
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Country", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
Exemple #2
0
 private void btnNewCountry_Click(object sender, EventArgs e)
 {
     try
     {
         frmCountryEntry fCountry = new frmCountryEntry((int)Common.Constant.Mode.Insert, 0);
         fCountry.ShowDialog();
         LoadCountryList();
         if (dgvCountry.Rows.Count > 0)
         {
             dgvCountry.CurrentCell = dgvCountry.Rows[0].Cells[0];
         }
         dgvCountry_SelectionChanged(sender, e);
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Country", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }