private void cmdNew_Click(object sender, EventArgs e) { try { frm_themmoi_dichvucls frm = new frm_themmoi_dichvucls(); frm.em_Action = action.Insert; frm.grdService = grdList; frm.dsService = dtDataCLS; frm.ShowDialog(); ModifyCommand(); }catch (Exception exception) { ModifyCommand(); } }
private void cmdEdit_Click(object sender, EventArgs e) { try { frm_themmoi_dichvucls frm = new frm_themmoi_dichvucls(); frm.em_Action = action.Update; if (grdList.CurrentRow != null) { frm.drServiceInfo = Utility.FetchOnebyCondition(dtDataCLS, DmucDichvucl.Columns.IdDichvu + "=" + v_Service_ID); frm.txtID.Text = v_Service_ID.ToString(); frm.dsService = dtDataCLS; frm.grdService = grdList; frm.ShowDialog(); ModifyCommand(); } } catch (Exception) { ModifyCommand(); } }
private void cmdNew_Click(object sender, EventArgs e) { try { frm_themmoi_dichvucls frm = new frm_themmoi_dichvucls(); frm.em_Action = action.Insert; frm.grdService = grdList; frm.dsService = dtDataCLS; frm.ShowDialog(); ModifyCommand(); }catch(Exception exception) { ModifyCommand(); } }
private void cmdEdit_Click(object sender, EventArgs e) { try { frm_themmoi_dichvucls frm = new frm_themmoi_dichvucls(); frm.em_Action = action.Update; if (grdList.CurrentRow != null) { frm.drServiceInfo = Utility.FetchOnebyCondition(dtDataCLS,DmucDichvucl.Columns.IdDichvu+ "=" + v_Service_ID); frm.txtID.Text = v_Service_ID.ToString(); frm.dsService = dtDataCLS; frm.grdService = grdList; frm.ShowDialog(); ModifyCommand(); } } catch (Exception) { ModifyCommand(); } }