Exemple #1
0
        private string CheckData(string columnName)
        {
            string errorInfo = null;

            if (columnName == "Code" || columnName == "Name")
            {
                if (_checker == null)
                {
                    _checker = new DataChecker(VMGlobal.SysProcessQuery.LinqOP);
                }
                errorInfo = _checker.CheckDataCodeName <SysUser>(this, columnName);
            }
            else if (columnName == "Password")
            {
                if (string.IsNullOrWhiteSpace(Password))
                {
                    errorInfo = "不能为空";
                }
                else if (!IsMatchPWDReg(Password))
                {
                    errorInfo = "必须为至少6位字母和数字组合字符串";
                }
            }
            return(errorInfo);
        }
        private string CheckData(string columnName)
        {
            string errorInfo = null;

            if (columnName == "Code" || columnName == "Name")
            {
                if (_checker == null)
                {
                    _checker = new DataChecker(VMGlobal.SysProcessQuery.LinqOP);
                }
                errorInfo = _checker.CheckDataCodeName <BusiDataDictionary>(this, columnName);
            }
            return(errorInfo);
        }
        private string CheckData(string columnName)
        {
            string errorInfo = null;

            if (columnName == "Code" || columnName == "Name")
            {
                if (_checker == null)
                {
                    _checker = new DataChecker(VMGlobal.SysProcessQuery.LinqOP);
                }
                errorInfo = _checker.CheckDataCodeName <SysOrganization>(this, columnName);
            }
            else if (columnName == "Telephone")
            {
                if (!Telephone.IsNullEmpty() && !(Telephone.IsTelepone() || Telephone.IsMobile()))
                {
                    errorInfo = "格式不正确";
                }
            }
            else if (columnName == "TypeId")
            {
                if (TypeId == default(int))
                {
                    errorInfo = "不能为空";
                }
            }
            else if (columnName == "AreaID")
            {
                if (AreaID == default(int))
                {
                    errorInfo = "不能为空";
                }
            }
            else if (columnName == "ProvienceID")
            {
                if (ProvienceID == default(int))
                {
                    errorInfo = "不能为空";
                }
            }
            else if (columnName == "CityID")
            {
                if (CityID == default(int))
                {
                    errorInfo = "不能为空";
                }
            }
            return(errorInfo);
        }
Exemple #4
0
        private string CheckData(string columnName)
        {
            string errorInfo = null;

            if (columnName == "Name")
            {
                if (_checker == null)
                {
                    _checker = new DataChecker(VMGlobal.SysProcessQuery.LinqOP);
                }
                errorInfo = _checker.CheckDataName <ProName>(this);
            }

            return(errorInfo);
        }