Example #1
0
 /// <summary>
 /// Delegate invoking of validation method.
 /// </summary>
 /// <param name="e"></param>
 internal protected virtual void OnCustomValidationMethod(CustomValidationEventArgs e)
 {
     if (this.CustomValidationMethod != null)
     {
         this.CustomValidationMethod(this, e);
     }
 }
Example #2
0
        /// <summary>
        /// Perform Custom Validation on specific control.
        /// </summary>
        /// <param name="ctrl"></param>
        /// <returns></returns>
        private ValidationRule CustomValidate(Control ctrl)
        {
            ValidationRule vr = _ValidationRules[ctrl] as ValidationRule;

            if (vr != null)
            {
                CustomValidationEventArgs e = new CustomValidationEventArgs(ctrl.Text, vr);
                vr.OnCustomValidationMethod(e);
            }
            return(vr);
        }
Example #3
0
        /// <summary>
        /// Perform Custom Validation on specific control.
        /// </summary>
        /// <param name="ctrl"></param>
        /// <returns></returns>
        private ValidationRule CustomValidate(Control ctrl)
        {
            ValidationRule vr = _ValidationRules[ctrl] as ValidationRule;

            if (vr != null)
            {
                CustomValidationEventArgs e = new CustomValidationEventArgs(ctrl.Text, vr);
                vr.OnCustomValidationMethod(e);
                //add by rad 2011/8/22
                vr.IsCustomError = !vr.IsValid;
            }
            return(vr);
        }
Example #4
0
        public void vr_CustomLoginValidationMethod(object sender,
                                                   Noogen.Validation.CustomValidationEventArgs e)
        {
            IAction_LoginForm ac            = ComponentLocator.Instance().Resolve <IAction_LoginForm>();
            LoginUserInfoVo   loginuserinfo = ac.GetLoginUserList(this.txtUserId.Text, this.txtPassword.Text);

            if (loginuserinfo == null)
            {
                e.IsValid = false;
            }
            else
            {
                e.IsValid = true;
                SessionUtils.SetSession(SessionUtils.COMMON_LOGIN_USER_INFO, loginuserinfo);
            }
        }
        /// <summary>
        /// Perform Custom Validation on specific control.
        /// </summary>
        /// <param name="ctrl"></param>
        /// <returns></returns>
        private ValidationRule CustomValidate(Control ctrl)
        {
            ValidationRule vr = _ValidationRules[ctrl] as ValidationRule;

            if (vr != null)
            {
                CustomValidationEventArgs e = new CustomValidationEventArgs(ctrl.Text, vr);
                vr.OnCustomValidationMethod(e);
            }
            return vr;
        }
		/// <summary>
		/// Delegate invoking of validation method.
		/// </summary>
		/// <param name="e"></param>
		internal protected virtual void OnCustomValidationMethod(CustomValidationEventArgs e)
		{
			if (this.CustomValidationMethod != null)
				this.CustomValidationMethod(this, e);
		}