Esempio n. 1
0
        private void RefreshValidator()
        {
            this.messagePop.Reset();
            string notEmpty = " " + ValidatorResource.NotEmpty;

            if (this.currentItem.BRANCH_CODE.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.BranchID + notEmpty);
            }
            if (this.currentItem.BRANCH_NAME.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.BranchName + notEmpty);
            }
            if (this.currentItem.REGION_ID == null || this.currentItem.REGION_ID.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.RegionID + notEmpty);
            }

            if (!this.currentItem.TEL.Equals("") && (!ValidateTest.IsPhoneNumber(this.currentItem.TEL) || this.currentItem.TEL.Length < 7))
            {
                this.messagePop.SetError(AssCommonResource.Tel + " " + ValidatorResource.lblNotTrue);
            }
            if (this.currentItem.BRANCH_TYPE != null && !this.currentItem.BRANCH_TYPE.Equals("HS") && this.currentItem.FATHER_ID == "")
            {
                this.messagePop.SetError(AssCommonResource.FatherID + notEmpty);
            }
        }
Esempio n. 2
0
        private void RefreshValidator()
        {
            this.messagePop.Reset();
            string notEmpty = " " + ValidatorResource.NotEmpty;

            if (this.currentItem.DEP_CODE.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.Dep_Code + notEmpty);
            }
            if (this.currentItem.DEP_NAME.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.Dep_Name + notEmpty);
            }
            if (this.branchName == null || this.branchName.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.BranchID + notEmpty);
            }
            if (this.currentItem.GROUP_ID == null || this.currentItem.GROUP_ID.Equals(""))
            {
                this.messagePop.SetError(AssCommonResource.GroupDep + notEmpty);
            }
            if (!this.currentItem.TEL.Equals("") && (!ValidateTest.IsPhoneNumber(this.currentItem.TEL) || this.currentItem.TEL.Length < 7))
            {
                this.messagePop.SetError(AssCommonResource.Tel + " " + ValidatorResource.lblNotTrue);
            }
        }