private void CancelData(bool isCancel) { try { string msg; if (isCancel) { msg = MessageCode.CFM0003; } else { msg = MessageCode.CFM0004; } if (rMessageBox.ShowConfirmation(this, msg) == DialogResult.Yes) { vmMas.CancelLabExt(LabExtResult, isCancel); if (isCancel) { rMessageBox.ShowInfomation(this, MessageCode.INF0004); } else { rMessageBox.ShowInfomation(this, MessageCode.INF0005); } this.IsDataChange = true; LabExtResult = vmMas.GetLabExt(LabExtResult.ID); RetriveData(); } } catch (Exception ex) { rMessageBox.ShowException(this, ex); } }
private void RetriveData() { try { if (LabExtResult == null) { LabExtResult = new sp_MAS310_GetLabExt_Result(); LabExtResult.CRT_DATE = DateTime.Now; this.ToolBarSwitch = "2122222222"; } else if (LabExtResult.DEL_ID.IsNull()) { this.ToolBarSwitch = "2122222102"; } else { this.ToolBarSwitch = "2022222012"; } CtrlUtil.EnableControls(LabExtResult.DEL_ID.IsNull(), txtName, txtSeq); bdSource.DataSource = LabExtResult; } catch (Exception ex) { rMessageBox.ShowException(this, ex); } }
private void SaveData() { try { this.Cursor = Cursors.WaitCursor; if (ValidateBeforeSave()) { if (rMessageBox.ShowConfirmation(this, MessageCode.CFM0001) == DialogResult.Yes) { int ID = vmMas.SaveLabExt(LabExtResult); rMessageBox.ShowInfomation(this, MessageCode.INF0002); this.IsDataChange = true; LabExtResult = vmMas.GetLabExt(ID); RetriveData(); } } } catch (Exception ex) { rMessageBox.ShowException(this, ex); } finally { this.Cursor = Cursors.Default; } }
private void EditData(DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { sp_MAS310_GetLabExt_Result row = gvResult.Rows[e.RowIndex].DataBoundItem as sp_MAS310_GetLabExt_Result; using (MAS310_LabExtEntry dlg = new MAS310_LabExtEntry(row)) { if (dlg.ShowDialog(this) == DialogResult.OK) { LoadData(); } } } }
public MAS310_LabExtEntry(sp_MAS310_GetLabExt_Result data) { InitializeComponent(); this.LabExtResult = data; }
public void CancelLabExt(sp_MAS310_GetLabExt_Result data, bool ISCANCEL) { service.CancelLabExt(data, ISCANCEL); }
public int SaveLabExt(sp_MAS310_GetLabExt_Result data) { return(service.SaveLabExt(data)); }