Exemple #1
0
        /// <summary>
        /// Checks the errors.
        /// </summary>
        /// <param name="formNo">The form no.</param>
        /// <returns>returns formNo</returns>
        private SliceValidationFields CheckErrors(int formNo)
        {
            SliceValidationFields sliceValidationFields = new SliceValidationFields();

            sliceValidationFields.FormNo = formNo;

            if (!string.IsNullOrEmpty(this.ComplainantEmailTextBox.Text.Trim()) && !TerraScanCommon.CheckValidEmailID(this.ComplainantEmailTextBox.Text.Trim()))
            {
                this.ComplainantEmailTextBox.Focus();
                sliceValidationFields.ErrorMessage = SharedFunctions.GetResourceString("EmailValidation");
                return(sliceValidationFields);
            }

            ////To Verify whether the selected value is valid Value member
            if (!string.IsNullOrEmpty(Convert.ToString(this.ComplainantAddressCombo.Text)) && string.IsNullOrEmpty(Convert.ToString(this.ComplainantAddressCombo.SelectedValue)))
            {
                sliceValidationFields.ErrorMessage = SharedFunctions.GetResourceString("CallInInValidComplainant");
                return(sliceValidationFields);
            }

            ////To Verify whether the selected value is valid Value member
            if (!string.IsNullOrEmpty(Convert.ToString(this.IncidentAddressCombo.Text)) && string.IsNullOrEmpty(Convert.ToString(this.IncidentAddressCombo.SelectedValue)))
            {
                sliceValidationFields.ErrorMessage = SharedFunctions.GetResourceString("CallInInValidIncident");
                return(sliceValidationFields);
            }

            sliceValidationFields.RequiredFieldMissing = false;
            return(sliceValidationFields);
        }