public bool LValidateSave() { try { errorProvider1.Clear(); bool _LValidateSave = true; if (!ClsUtility._IClsUtility.LValidateTextBox(RdTxtSuppCode, errorProvider1, "Unit Code Cannot Be Left Blank.")) { _LValidateSave = false; } else if (!ClsUtility._IClsUtility.LValidateTextBox(RdTxtSuppName, errorProvider1, "Unit Description Cannot Be Left Blank.")) { _LValidateSave = false; } else if (ClsUtility._IClsUtility.FormMode == ClsUtility.enmFormMode.AddMode && ClsUtility._IClsUtility.IsCodeExists("A3DIMS.dbo.MUnit", "cUnitCode", RdTxtSuppCode.Text.Trim(), "Unit Code Already Exists!!")) { errorProvider1.SetError(RdTxtSuppCode, "Unit Code Already Exists!!"); RdTxtSuppCode.Focus(); _LValidateSave = false; } return(_LValidateSave); } catch (Exception ex) { ClsMessage._IClsMessage.ProjectExceptionMessage(ex); return(false); } }
public void SetFormMode(ClsUtility.enmFormMode _FormMode) { switch (_FormMode) { case ClsUtility.enmFormMode.AddMode: SetEnable(true); RdTxtSuppCode.Focus(); break; case ClsUtility.enmFormMode.EditMode: SetEnable(true); RdTxtSuppCode.Enabled = false; break; case ClsUtility.enmFormMode.NormalMode: SetEnable(false); break; } }