void AddSt() { try { FrmTeacher frmTch = new FrmTeacher(); frmTch.ShowDialog(); LoadListToGrid(); } catch (Exception ex) { Logger.LogException(ex); } }
void UpdateSt() { try { if (grdVwTeachers.SelectedRows.Count < 1) { MessageBox.Show("Please Select a row."); return; } string strId = string.Format("{0}", grdVwTeachers.SelectedRows[0].Cells[0].Value); int id; if (int.TryParse(strId, out id)) { FrmTeacher frmSt = new FrmTeacher(id); frmSt.ShowDialog(); } LoadListToGrid(); } catch (Exception ex) { Logger.LogException(ex); } }