}//----------------------- #endregion #region Programes-Defined Functions //this function will validate controls public Boolean ValidateControls() { Boolean isValid = true; _errProvider.SetError(this.cboSchoolYearParticular, ""); _errProvider.SetError(this.txtAmount, ""); if (String.IsNullOrEmpty(_detailsInfo.SchoolFeeParticularInfo.FeeParticularSysId)) { _errProvider.SetIconAlignment(this.cboSchoolYearParticular, ErrorIconAlignment.MiddleLeft); _errProvider.SetError(this.cboSchoolYearParticular, "School Fee Particular is required."); isValid = false; } if (_detailsInfo.Amount < 1) { _errProvider.SetIconAlignment(this.txtAmount, ErrorIconAlignment.MiddleRight); _errProvider.SetError(this.txtAmount, "An amount is required."); isValid = false; } if (_schoolFeeManager.IsExistsLevelParticularSchoolFeeDetails(_detailsInfo.SchoolFeeLevelInfo.FeeLevelSysId, _detailsInfo.SchoolFeeParticularInfo.FeeParticularSysId)) { _errProvider.SetIconAlignment(this.cboSchoolYearParticular, ErrorIconAlignment.MiddleRight); _errProvider.SetError(this.cboSchoolYearParticular, "Particular Description already exist."); isValid = false; } return(isValid); }//-----------------------------