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