Пример #1
0
        /// <summary>
        /// 对配置类型(码表)(PTConfigType)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="configType">配置类型(码表)(PTConfigType)实例对象</param>
        public static void CheckValid(PTConfigType pTConfigType)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTConfigType.Id))
            {
                throw new CustomException("“编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfigType.Name))
            {
                throw new CustomException("“名称”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTConfigType.Id, 50))
            {
                throw new CustomException("“编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigType.Name, 50))
            {
                throw new CustomException("“名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigType.Description, 50))
            {
                throw new CustomException("“描述”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #2
0
        /// <summary>
        /// 对部门信息(Department)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="department">部门信息(Department)实例对象</param>
        public static void CheckValid(Department department)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(department.DepartmentName))
            {
                throw new CustomException("“部门名称”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(department.DepartmentName, 50))
            {
                throw new CustomException("“部门名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(department.ManagerName, 50))
            {
                throw new CustomException("“经理姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(department.ContactPhone, 50))
            {
                throw new CustomException("“联系电话”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #3
0
        /// <summary>
        /// 对基本角色信息(PTRoles)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTRoles">基本角色信息(PTRoles)实例对象</param>
        public static void CheckValid(PTRoles pTRoles)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTRoles.RoleName))
            {
                throw new CustomException("“角色名称”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTRoles.StateId))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTRoles.RoleName, 50))
            {
                throw new CustomException("“角色名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.GroupId, 50))
            {
                throw new CustomException("“分组编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.StateId, 50))
            {
                throw new CustomException("“状态”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTRoles.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #4
0
        /// <summary>
        /// 对现存健康问题表(MajorProblems)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="majorProblems">现存健康问题表(MajorProblems)实例对象</param>
        public static void CheckValid(MajorProblems majorProblems)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(majorProblems.CheckId))
            {
                throw new CustomException("“体检编号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(majorProblems.DiseasesOfTheNervousSystem, 50))
            {
                throw new CustomException("“神经系统疾病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.OtherSystemDiseases, 50))
            {
                throw new CustomException("“其他系统疾病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.HospitalizationIs, 50))
            {
                throw new CustomException("“住院治疗情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.MainMedications, 50))
            {
                throw new CustomException("“主要用药情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.IPVHistory, 50))
            {
                throw new CustomException("“非免疫规划预防接种史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.HealthAssessment, 50))
            {
                throw new CustomException("“健康评价”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.Guidance, 50))
            {
                throw new CustomException("“健康指导”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(majorProblems.RiskControlSuggestions, 50))
            {
                throw new CustomException("“危险因素控制建议”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #5
0
        /// <summary>
        /// 对配置分组(码表)(PTConfigGroup)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTConfigGroup">配置分组(码表)(PTConfigGroup)实例对象</param>
        public static void CheckValid(PTConfigGroup pTConfigGroup)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTConfigGroup.Name))
            {
                throw new CustomException("“名称”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTConfigGroup.Name, 50))
            {
                throw new CustomException("“名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigGroup.Description, 500))
            {
                throw new CustomException("“描述”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigGroup.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigGroup.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigGroup.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigGroup.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigGroup.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #6
0
        /// <summary>
        /// 对管理机构(Institutions)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="institutions">管理机构(Institutions)实例对象</param>
        public static void CheckValid(Institutions institutions)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(institutions.Name))
            {
                throw new CustomException("“机构名称”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(institutions.Name, 50))
            {
                throw new CustomException("“机构名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(institutions.IType, 50))
            {
                throw new CustomException("“机构类型”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(institutions.IAddress, 50))
            {
                throw new CustomException("“机构地址”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(institutions.Phone, 50))
            {
                throw new CustomException("“联系电话”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(institutions.Head, 50))
            {
                throw new CustomException("“负责人”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(institutions.Remarks, 50))
            {
                throw new CustomException("“备注”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #7
0
        /// <summary>
        /// 对社区医生(Doctor)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="doctor">社区医生(Doctor)实例对象</param>
        public static void CheckValid(Doctor doctor)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(doctor.Name))
            {
                throw new CustomException("“姓名”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(doctor.DoctorId, 50))
            {
                throw new CustomException("“医生编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(doctor.Name, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(doctor.ExamNo, 50))
            {
                throw new CustomException("“门诊号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(doctor.Pwd, 50))
            {
                throw new CustomException("“密码”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(doctor.Remarks, 50))
            {
                throw new CustomException("“备注”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #8
0
        /// <summary>
        /// 对角色权限关联表(PTRoleLink)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTRoleLink">角色权限关联表(PTRoleLink)实例对象</param>
        public static void CheckValid(PTRoleLink pTRoleLink)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTRoleLink.RoleId))
            {
                throw new CustomException("“角色编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTRoleLink.FunctionId))
            {
                throw new CustomException("“功能编号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTRoleLink.FunctionId, 50))
            {
                throw new CustomException("“功能编号”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #9
0
        /// <summary>
        /// 对配置值(PTConfigValue)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTConfigValue">配置值(PTConfigValue)实例对象</param>
        public static void CheckValid(PTConfigValue pTConfigValue)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTConfigValue.ConfigItem))
            {
                throw new CustomException("“配置项”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfigValue.CurrentValue))
            {
                throw new CustomException("“当前值”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfigValue.Target))
            {
                throw new CustomException("“适用对象”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTConfigValue.ConfigItem, 50))
            {
                throw new CustomException("“配置项”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.CurrentValue, 50))
            {
                throw new CustomException("“当前值”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.Target, 50))
            {
                throw new CustomException("“适用对象”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfigValue.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #10
0
        /// <summary>
        /// 对基本组织机构(PTOrg)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTOrg">基本组织机构(PTOrg)实例对象</param>
        public static void CheckValid(PTOrg pTOrg)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTOrg.FatherId))
            {
                throw new CustomException("“上级编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTOrg.LevelId))
            {
                throw new CustomException("“层级序号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTOrg.StateId))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTOrg.FatherId, 50))
            {
                throw new CustomException("“上级编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.LevelId, 50))
            {
                throw new CustomException("“层级序号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.OrgName, 500))
            {
                throw new CustomException("“机构名称”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.StateId, 50))
            {
                throw new CustomException("“状态”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTOrg.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #11
0
        /// <summary>
        /// 对居民(Resident)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="resident">居民(Resident)实例对象</param>
        public static void CheckValid(Resident resident)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(resident.ResidentId))
            {
                throw new CustomException("“居民号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(resident.Name))
            {
                throw new CustomException("“姓名”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(resident.IdNumber))
            {
                throw new CustomException("“身份证号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(resident.ResidentId, 50))
            {
                throw new CustomException("“居民号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Name, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Phone, 20))
            {
                throw new CustomException("“联系电话”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Nation, 20))
            {
                throw new CustomException("“民族”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.ContactName, 50))
            {
                throw new CustomException("“联系人姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.ContactPhone, 20))
            {
                throw new CustomException("“联系人电话”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Professional, 50))
            {
                throw new CustomException("“职业”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.WorkUnits, 50))
            {
                throw new CustomException("“工作单位”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.FathersName, 50))
            {
                throw new CustomException("“父亲姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.MotherName, 50))
            {
                throw new CustomException("“母亲姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.GuardiansName, 50))
            {
                throw new CustomException("“监护人姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.GuardianPhone, 50))
            {
                throw new CustomException("“监护人电话”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Registered, 50))
            {
                throw new CustomException("“户籍所在地”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.RegisteredAddress, 50))
            {
                throw new CustomException("“户籍地址”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Live, 50))
            {
                throw new CustomException("“现居住所在地”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.LiveAddress, 50))
            {
                throw new CustomException("“现居住地址”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.InputtingPerson, 50))
            {
                throw new CustomException("“建档人”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.ResponsibleDoctor, 50))
            {
                throw new CustomException("“责任医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(resident.Remarks, 200))
            {
                throw new CustomException("“备注”长度不能超过 200 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #12
0
        /// <summary>
        /// 对血压检测类(Pressure)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pressure">血压检测类(Pressure)实例对象</param>
        public static void CheckValid(Pressure pressure)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pressure.Checkdate))
            {
                throw new CustomException("“检测日期”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pressure.ExamNo))
            {
                throw new CustomException("“门诊号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pressure.CheckID))
            {
                throw new CustomException("“检查号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pressure.Name))
            {
                throw new CustomException("“姓名”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pressure.Check_flag))
            {
                throw new CustomException("“检查标志”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pressure.Status))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pressure.ExamNo, 50))
            {
                throw new CustomException("“门诊号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.CheckID, 50))
            {
                throw new CustomException("“检查号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Name, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Sex.ToString(), 50))
            {
                throw new CustomException("“性别”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Doctor, 50))
            {
                throw new CustomException("“开单医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.DeviceID, 50))
            {
                throw new CustomException("“设备号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Version, 50))
            {
                throw new CustomException("“版本号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Reserve, 50))
            {
                throw new CustomException("“保留字段”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Hosname, 50))
            {
                throw new CustomException("“医院”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Auditdoctor, 50))
            {
                throw new CustomException("“审核医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str1, 50))
            {
                throw new CustomException("“人员类型”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str2, 50))
            {
                throw new CustomException("“血压单位”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str3, 50))
            {
                throw new CustomException("“身份证号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str4, 50))
            {
                throw new CustomException("“血压级别”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str5, 50))
            {
                throw new CustomException("“结论建议”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str6, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str7, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str8, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str9, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.Str10, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001002_ename, 50))
            {
                throw new CustomException("“收缩压简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001002_cname, 50))
            {
                throw new CustomException("“收缩压全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001002_unit, 50))
            {
                throw new CustomException("“收缩压UNIT”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001003_ename, 50))
            {
                throw new CustomException("“舒张压简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001003_cname, 50))
            {
                throw new CustomException("“舒张压全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001003_unit, 50))
            {
                throw new CustomException("“舒张压UNIT”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001004_ename, 50))
            {
                throw new CustomException("“平均压简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001004_cname, 50))
            {
                throw new CustomException("“平均压全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001004_unit, 50))
            {
                throw new CustomException("“平均压UNIT”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001008_ename, 50))
            {
                throw new CustomException("“脉率简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001008_cname, 50))
            {
                throw new CustomException("“脉率全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pressure.T3001008_unit, 50))
            {
                throw new CustomException("“脉率UNIT”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #13
0
        /// <summary>
        /// 对员工信息(Employee)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="employee">员工信息(Employee)实例对象</param>
        public static void CheckValid(Employee employee)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(employee.BadgeId))
            {
                throw new CustomException("“工号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.Name))
            {
                throw new CustomException("“姓名”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.Sex))
            {
                throw new CustomException("“性别”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.DateOfBirth))
            {
                throw new CustomException("“出生日期”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.IDCardId))
            {
                throw new CustomException("“身份证号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.Department))
            {
                throw new CustomException("“所在部门”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.GraduateSchool))
            {
                throw new CustomException("“毕业学校”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.AcademicQualifications))
            {
                throw new CustomException("“学历”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(employee.ContactPhone))
            {
                throw new CustomException("“联系电话”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(employee.BadgeId, 50))
            {
                throw new CustomException("“工号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.Name, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.IDCardId, 50))
            {
                throw new CustomException("“身份证号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.Nationa, 50))
            {
                throw new CustomException("“民族”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.PoliticalLandscape, 50))
            {
                throw new CustomException("“政治面貌”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.MaritalStatus, 50))
            {
                throw new CustomException("“婚姻状况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.PlaceOfHouseholdRegistration, 50))
            {
                throw new CustomException("“户口所在地”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.ResidenceAddress, 50))
            {
                throw new CustomException("“现居住住址”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.GraduateSchool, 50))
            {
                throw new CustomException("“毕业学校”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.FieldOfStudy, 50))
            {
                throw new CustomException("“所学专业”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.GraduationDate, 50))
            {
                throw new CustomException("“毕业时间”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.AcademicQualifications, 50))
            {
                throw new CustomException("“学历”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.ContactPhone, 50))
            {
                throw new CustomException("“联系电话”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.EmergencyContacts, 50))
            {
                throw new CustomException("“紧急联系人”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(employee.EmergencyTelephone, 50))
            {
                throw new CustomException("“紧急电话”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #14
0
        /// <summary>
        /// 对提示消息(Notices)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="notices">提示消息(Notices)实例对象</param>
        public static void CheckValid(PTNotices notices)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(notices.TypeId))
            {
                throw new CustomException("“类别”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(notices.ReleaseTime))
            {
                throw new CustomException("“发布时间”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(notices.ReadStatus))
            {
                throw new CustomException("“已读状态”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(notices.Title))
            {
                throw new CustomException("“标题”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(notices.TypeId, 50))
            {
                throw new CustomException("“类别”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.OrgRange, 50))
            {
                throw new CustomException("“机构范围”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.RoleScope, 50))
            {
                throw new CustomException("“角色范围”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.UserRange, 50))
            {
                throw new CustomException("“用户范围”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Author, 50))
            {
                throw new CustomException("“作者”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.ReleaseTime, 50))
            {
                throw new CustomException("“发布时间”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.ReadStatus, 50))
            {
                throw new CustomException("“已读状态”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Title, 50))
            {
                throw new CustomException("“标题”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Content, 20000))
            {
                throw new CustomException("“正文”长度不能超过 20000 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Attachment, 50))
            {
                throw new CustomException("“附件地址”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.PictureAddress, 50))
            {
                throw new CustomException("“图片地址”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Alternate4, 50))
            {
                throw new CustomException("“备用4”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(notices.Alternate5, 50))
            {
                throw new CustomException("“备用5”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #15
0
        /// <summary>
        /// 对基础对象名称(YWExamScore)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWExamScore">基础对象名称(YWExamScore)实例对象</param>
        public static void CheckValid(YWExamScore yWExamScore)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWExamScore.ExamId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.Score))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.StudentName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.StudentId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.CreateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.UpdateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.CreateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.CreateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.UpdateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamScore.UpdateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWExamScore.StudentName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.CreateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.UpdateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamScore.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #16
0
        /// <summary>
        /// 对基础对象名称(YWComment)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWComment">基础对象名称(YWComment)实例对象</param>
        public static void CheckValid(YWComment yWComment)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWComment.PlanId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.PlanName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.CourseId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.CourseName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.CreateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.CreateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.UpdateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.UpdateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.CreateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.UpdateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.Status))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.Support))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWComment.Oppose))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWComment.PlanName, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.CourseName, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.CreateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.UpdateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.Content, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWComment.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #17
0
        /// <summary>
        /// 对基础对象名称(YWCourseJoin)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWCourseJoin">基础对象名称(YWCourseJoin)实例对象</param>
        public static void CheckValid(YWCourseJoin yWCourseJoin)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWCourseJoin.CourseId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.CourseName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.PlanId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.Status))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.TeacherName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.TeacherId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.StudentName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.StudentId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourseJoin.LastTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWCourseJoin.CourseName, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.TeacherName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.StudentName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourseJoin.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #18
0
        /// <summary>
        /// 对居民疾病信息(ResidentDiseaseInfo)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public static void CheckValid(ResidentDiseaseInfo residentDiseaseInfo)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(residentDiseaseInfo.Id))
            {
                throw new CustomException("“居民内部编号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(residentDiseaseInfo.Id, 50))
            {
                throw new CustomException("“居民内部编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HODA, 50))
            {
                throw new CustomException("“药物过敏史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.EH, 50))
            {
                throw new CustomException("“暴露史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HBP, 50))
            {
                throw new CustomException("“高血压”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.GDM, 50))
            {
                throw new CustomException("“糖尿病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.CH, 50))
            {
                throw new CustomException("“冠心病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.COP, 50))
            {
                throw new CustomException("“慢性阻塞性肺疾病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.MTC, 50))
            {
                throw new CustomException("“恶性肿瘤”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Stroke, 50))
            {
                throw new CustomException("“脑卒中”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.SMI, 50))
            {
                throw new CustomException("“重性精神”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.TB, 50))
            {
                throw new CustomException("“结核病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Hepatitis, 50))
            {
                throw new CustomException("“肝炎”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.OLID, 50))
            {
                throw new CustomException("“其他法定传染病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.OD, 50))
            {
                throw new CustomException("“职业病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Other, 50))
            {
                throw new CustomException("“其他”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfFather, 50))
            {
                throw new CustomException("“父亲病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfMother, 50))
            {
                throw new CustomException("“母亲病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfBrothers, 50))
            {
                throw new CustomException("“兄弟姐妹病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfChildren, 50))
            {
                throw new CustomException("“子女病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.GeneticHistory, 50))
            {
                throw new CustomException("“遗传病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Disability, 50))
            {
                throw new CustomException("“残疾情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Remarks, 50))
            {
                throw new CustomException("“备注”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #19
0
        /// <summary>
        /// 对配置设置(PTConfig)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTConfig">配置设置(PTConfig)实例对象</param>
        public static void CheckValid(PTConfig pTConfig)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTConfig.Id))
            {
                throw new CustomException("“编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfig.Name))
            {
                throw new CustomException("“名称”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfig.Type))
            {
                throw new CustomException("“类型”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfig.GroupId))
            {
                throw new CustomException("“分组”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTConfig.DefaultValue))
            {
                throw new CustomException("“默认值”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTConfig.Id, 50))
            {
                throw new CustomException("“编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Name, 50))
            {
                throw new CustomException("“名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Type, 50))
            {
                throw new CustomException("“类型”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.DefaultValue, 50))
            {
                throw new CustomException("“默认值”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Notes, 500))
            {
                throw new CustomException("“备注”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTConfig.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #20
0
        /// <summary>
        /// 对高级体检表(AdvancedExamination)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="advancedExamination">高级体检表(AdvancedExamination)实例对象</param>
        public static void CheckValid(AdvancedExamination advancedExamination)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(advancedExamination.Id))
            {
                throw new CustomException("“检查编号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(advancedExamination.Oral, 50))
            {
                throw new CustomException("“口腔”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Hearing, 50))
            {
                throw new CustomException("“听力”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.FMA, 50))
            {
                throw new CustomException("“运动功能”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Fundus, 50))
            {
                throw new CustomException("“眼底”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Skin, 50))
            {
                throw new CustomException("“皮肤”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Sclera, 50))
            {
                throw new CustomException("“巩膜”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.LN, 50))
            {
                throw new CustomException("“淋巴结”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Lung, 50))
            {
                throw new CustomException("“肺功能”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Heart, 50))
            {
                throw new CustomException("“心脏”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Abdomen, 50))
            {
                throw new CustomException("“腹部”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.LowerExtremityEdema, 50))
            {
                throw new CustomException("“下肢水肿”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.DPAP, 50))
            {
                throw new CustomException("“足背动脉搏动”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Dre, 50))
            {
                throw new CustomException("“肛门指诊”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.FBG, 50))
            {
                throw new CustomException("“空腹血糖”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.U_MTB, 50))
            {
                throw new CustomException("“尿微量蛋白”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.GHb, 50))
            {
                throw new CustomException("“糖化血红蛋白”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.HBsAG, 50))
            {
                throw new CustomException("“乙型肝炎表面抗原”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.ECG, 50))
            {
                throw new CustomException("“心电图”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.XRay, 50))
            {
                throw new CustomException("“胸部X线片”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.BUltrasonic, 50))
            {
                throw new CustomException("“B超”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.CervicalSmear, 50))
            {
                throw new CustomException("“宫颈涂片”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Other, 50))
            {
                throw new CustomException("“其他”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Physical, 50))
            {
                throw new CustomException("“体质”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(advancedExamination.Guidance, 50))
            {
                throw new CustomException("“保健指导意见”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #21
0
        /// <summary>
        /// 对系统功能列表(PTFunctions)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTFunctions">系统功能列表(PTFunctions)实例对象</param>
        public static void CheckValid(PTFunctions pTFunctions)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTFunctions.Id))
            {
                throw new CustomException("“编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTFunctions.FatherNumber))
            {
                throw new CustomException("“上级编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTFunctions.FunctionName))
            {
                throw new CustomException("“功能名称”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTFunctions.StateId))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTFunctions.Id, 50))
            {
                throw new CustomException("“编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.FatherNumber, 50))
            {
                throw new CustomException("“上级编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.FunctionName, 50))
            {
                throw new CustomException("“功能名称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.FunctionTypeId, 50))
            {
                throw new CustomException("“功能类型”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.FunctionPath, 50))
            {
                throw new CustomException("“路径”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.Description, 500))
            {
                throw new CustomException("“功能描述”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.StateId, 50))
            {
                throw new CustomException("“状态”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.Alternate2, 50))
            {
                throw new CustomException("“备用2”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTFunctions.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #22
0
        /// <summary>
        /// 对基础对象名称(YWExamQuestion)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWExamQuestion">基础对象名称(YWExamQuestion)实例对象</param>
        public static void CheckValid(YWExamQuestion yWExamQuestion)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWExamQuestion.ExamId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamQuestion.Type))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamQuestion.Pic))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamQuestion.Score))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamQuestion.CreateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamQuestion.UpdateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWExamQuestion.Pic, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Chance1, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Chance2, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Chance3, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Chance4, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Chance5, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Content, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.ChanceAnswer, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.ObjectAnswer, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.ObjectPic, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamQuestion.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #23
0
        /// <summary>
        /// 对基本用户信息(PTUsers)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="pTUsers">基本用户信息(PTUsers)实例对象</param>
        public static void CheckValid(PTUsers pTUsers)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(pTUsers.UserName))
            {
                throw new CustomException("“用户名”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTUsers.Password))
            {
                throw new CustomException("“密码”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTUsers.OrgId))
            {
                throw new CustomException("“机构编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTUsers.Nickname))
            {
                throw new CustomException("“昵称”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(pTUsers.StateId))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(pTUsers.UserName, 50))
            {
                throw new CustomException("“用户名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTUsers.Password, 50))
            {
                throw new CustomException("“密码”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTUsers.Nickname, 50))
            {
                throw new CustomException("“昵称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTUsers.StateId, 50))
            {
                throw new CustomException("“状态”编号长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTUsers.Alternate1, 50))
            {
                throw new CustomException("“备用1”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }



            if (DataValid.IsOutLength(pTUsers.Alternate3, 50))
            {
                throw new CustomException("“备用3”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTUsers.Alternate4, 500))
            {
                throw new CustomException("“备用4”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(pTUsers.Alternate5, 500))
            {
                throw new CustomException("“备用5”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #24
0
        /// <summary>
        /// 对体温检测类(Temperature)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="temperature">体温检测类(Temperature)实例对象</param>
        public static void CheckValid(Temperature temperature)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(temperature.Checkdate))
            {
                throw new CustomException("“检查日期”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(temperature.ExamNo))
            {
                throw new CustomException("“门诊号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(temperature.CheckID))
            {
                throw new CustomException("“检查号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(temperature.Name))
            {
                throw new CustomException("“姓名”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(temperature.Check_flag))
            {
                throw new CustomException("“检查标志”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(temperature.Status))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(temperature.ExamNo, 50))
            {
                throw new CustomException("“门诊号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.CheckID, 50))
            {
                throw new CustomException("“检查号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Name, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Sex.ToString(), 50))
            {
                throw new CustomException("“性别”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Doctor, 50))
            {
                throw new CustomException("“开单医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.DeviceID, 50))
            {
                throw new CustomException("“设备号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Version, 50))
            {
                throw new CustomException("“版本号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Reserve, 50))
            {
                throw new CustomException("“保留字段”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Hosname, 50))
            {
                throw new CustomException("“医院”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Auditdoctor, 50))
            {
                throw new CustomException("“审核医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str1, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str2, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str3, 50))
            {
                throw new CustomException("“身份证号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str4, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str5, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str6, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str7, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str8, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str9, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.Str10, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.T3001007_ename, 50))
            {
                throw new CustomException("“体温简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.T3001007_cname, 50))
            {
                throw new CustomException("“体温全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(temperature.T3001007_unit, 50))
            {
                throw new CustomException("“体温UNIT”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #25
0
        /// <summary>
        /// 对血氧检测类(BloodOxygen)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="bloodOxygen">血氧检测类(BloodOxygen)实例对象</param>
        public static void CheckValid(BloodOxygen bloodOxygen)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(bloodOxygen.Checkdate))
            {
                throw new CustomException("“检查日期”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(bloodOxygen.ExamNo))
            {
                throw new CustomException("“门诊号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(bloodOxygen.CheckID))
            {
                throw new CustomException("“检查号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(bloodOxygen.Name))
            {
                throw new CustomException("“姓名”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(bloodOxygen.Check_flag))
            {
                throw new CustomException("“检查标记”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(bloodOxygen.Status))
            {
                throw new CustomException("“状态”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(bloodOxygen.ExamNo, 50))
            {
                throw new CustomException("“门诊号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.CheckID, 50))
            {
                throw new CustomException("“检查号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Name, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Sex.ToString(), 50))
            {
                throw new CustomException("“性别”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Doctor, 50))
            {
                throw new CustomException("“开单医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.DeviceID, 50))
            {
                throw new CustomException("“设备号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Version, 50))
            {
                throw new CustomException("“版本号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Reserve, 50))
            {
                throw new CustomException("“保留字段”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Hosname, 50))
            {
                throw new CustomException("“医院”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Auditdoctor, 50))
            {
                throw new CustomException("“审核医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str1, 50))
            {
                throw new CustomException("“心电诊断”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str2, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str3, 50))
            {
                throw new CustomException("“身份证号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str4, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str5, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str6, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str7, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str8, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str9, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.Str10, 50))
            {
                throw new CustomException("“冗余”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.T3001005_ename, 50))
            {
                throw new CustomException("“血氧简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.T3001005_cname, 50))
            {
                throw new CustomException("“血氧全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.T3001005_unit, 50))
            {
                throw new CustomException("“血氧UNIT”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.T3001009_ename, 50))
            {
                throw new CustomException("“脉率简称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.T3001009_cname, 50))
            {
                throw new CustomException("“脉率全称”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(bloodOxygen.T3001009_unit, 50))
            {
                throw new CustomException("“UNIT(BPM)”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #26
0
        /// <summary>
        /// 对基础对象名称(YWCoursePlan)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWCoursePlan">基础对象名称(YWCoursePlan)实例对象</param>
        public static void CheckValid(YWCoursePlan yWCoursePlan)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWCoursePlan.CourseId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.CourseName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.PlanTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.StartTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.FinishTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.CreateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.UpdateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCoursePlan.Status))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWCoursePlan.CourseName, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Name, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Content, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Type, 10))
            {
                throw new CustomException("“”长度不能超过 10 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Pic, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Video, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Study, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Test, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCoursePlan.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #27
0
        /// <summary>
        /// 对基础对象名称(YWExamAnswer)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWExamAnswer">基础对象名称(YWExamAnswer)实例对象</param>
        public static void CheckValid(YWExamAnswer yWExamAnswer)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWExamAnswer.ExamId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.QuestionId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.Type))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.Score))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.CreateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.UpdateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.CreateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.CreateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.UpdateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWExamAnswer.UpdateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWExamAnswer.ChanceAnswer, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.ObjectAnswer, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.ObjectPic, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.CreateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.UpdateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWExamAnswer.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #28
0
        /// <summary>
        /// 对基础体检表(BasicExamination)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="basicExamination">基础体检表(BasicExamination)实例对象</param>
        public static void CheckValid(BasicExamination basicExamination)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(basicExamination.Id))
            {
                throw new CustomException("“编号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(basicExamination.ResidentId))
            {
                throw new CustomException("“居民号”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(basicExamination.CheckID))
            {
                throw new CustomException("“体检编号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(basicExamination.ResidentId, 50))
            {
                throw new CustomException("“居民号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.TheName, 50))
            {
                throw new CustomException("“姓名”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.CheckID, 50))
            {
                throw new CustomException("“体检编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.CheckDate, 50))
            {
                throw new CustomException("“体检日期”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.Doctor, 50))
            {
                throw new CustomException("“体检医生”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.PhysicalExercise, 50))
            {
                throw new CustomException("“体育锻炼”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.Smoking, 50))
            {
                throw new CustomException("“吸烟情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.Drinking, 50))
            {
                throw new CustomException("“饮酒情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(basicExamination.OccupationalExposure, 50))
            {
                throw new CustomException("“职业暴露情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Пример #29
0
        /// <summary>
        /// 对基础对象名称(YWCourse)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="yWCourse">基础对象名称(YWCourse)实例对象</param>
        public static void CheckValid(YWCourse yWCourse)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(yWCourse.CourseName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.LinkBook))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.TeacherName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.TeacherId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.CreateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.UpdateTime))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.UpdateUserName))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.UpdateUserId))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            if (DataValid.IsNull(yWCourse.Status))
            {
                throw new CustomException("“”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(yWCourse.CourseName, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.LinkBook, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.TeacherName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Content, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Title, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Span, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Show, 10))
            {
                throw new CustomException("“”长度不能超过 10 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Pic, 500))
            {
                throw new CustomException("“”长度不能超过 500 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.UpdateUserName, 20))
            {
                throw new CustomException("“”长度不能超过 20 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Alternate1, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Alternate2, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Alternate3, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Alternate4, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(yWCourse.Alternate5, 50))
            {
                throw new CustomException("“”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }