/// <summary> /// override /// checks if the dialog values are valid /// </summary> /// <param name="plistStatus"></param> /// <returns></returns> public override CStatus ValidateUserInput(out CParameterList plistStatus) { CStatus status = new CStatus(); plistStatus = new CParameterList(); if (string.IsNullOrEmpty(txtService.Text)) { plistStatus.AddInputParameter("ERROR_VE_SERVICELABEL", Resources.ErrorMessages.ERROR_VE_SERVICELABEL); status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; } if (EditMode == k_EDIT_MODE.INSERT || EditMode == k_EDIT_MODE.UPDATE && txtService.Text != OriginalLabel) { if (CGridView.CellValueExists(GView, 1, txtService.Text)) { plistStatus.AddInputParameter("ERROR_DATA_EXISTS", Resources.ErrorMessages.ERROR_DATA_EXISTS); status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; } } return(status); }
/// <summary> /// validate the user input /// </summary> /// <param name="BaseMstr"></param> /// <param name="lStatusCode"></param> /// <param name="strStatusComment"></param> /// <returns></returns> public override CStatus ValidateUserInput(out CParameterList plistStatus) { plistStatus = new CParameterList(); CStatus status = new CStatus(); //label if (txtItemGroupLabel.Text.Length < 1) { status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; plistStatus.AddInputParameter("ERROR_IG_LABEL", Resources.ErrorMessages.ERROR_IG_LABEL); } //active - nothing to check //if we are inserting make sure the row //does not already esist. if (EditMode == k_EDIT_MODE.INSERT || EditMode == k_EDIT_MODE.UPDATE && txtItemGroupLabel.Text != OriginalLabel) { if (CGridView.CellValueExists(GView, 1, txtItemGroupLabel.Text)) { status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; plistStatus.AddInputParameter("ERROR_DATA_EXISTS", Resources.ErrorMessages.ERROR_DATA_EXISTS); } } return(status); }
/// <summary> /// validate user input /// </summary> /// <param name="BaseMstr"></param> /// <param name="lStatusCode"></param> /// <param name="strStatusComment"></param> /// <returns></returns> public override CStatus ValidateUserInput(out CParameterList plistStatus) { //parameter list to hold status information plistStatus = new CParameterList(); CStatus status = new CStatus(); //label if (txtOSLabel.Text.Length < 1) { status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; plistStatus.AddInputParameter("ERROR_OS_LABEL", Resources.ErrorMessages.ERROR_OS_LABEL); } //definition if (ddlOSDefinition.SelectedItem == null || String.IsNullOrEmpty(ddlOSDefinition.SelectedItem.Text)) { status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; plistStatus.AddInputParameter("ERROR_OS_DEFINITION", Resources.ErrorMessages.ERROR_OS_DEFINITION); } //active - nothing to check //if we are inserting make sure the row //does not already esist. if (EditMode == k_EDIT_MODE.INSERT || EditMode == k_EDIT_MODE.UPDATE && txtOSLabel.Text != OriginalLabel) { if (GView != null) { if (CGridView.CellValueExists(GView, 1, txtOSLabel.Text)) { plistStatus.AddInputParameter("ERROR_DATA_EXISTS", Resources.ErrorMessages.ERROR_DATA_EXISTS); } } } return(status); }