public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); result.AddCheckNull(field, new[] { "产品级别编码", "产品级别", "产品级别名称" }); if (base.IsNew()) { result.AddCheckEnable(field, new[] { "产品级别编码" }); result.AddCheckUsed(field, QcProductLevels, new[] { "产品级别编码" }, 0); } result.AddCheckUsed(field, QcProductLevels, new[] { "产品级别", "产品级别名称" }, 0); //与别的类不同,新建未加入静态的QcProductLevels列表 if (result.Count > 0) { return(result); } return(null); }
/// <summary> /// 检查指定的字段是否合法 /// </summary> /// <param name="field"></param> /// <returns></returns> public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); result.AddCheckNull(field, new[] { "组名" }); result.AddCheckUsed(field, QcDepartment.lstDepartment, new[] { "组名" }, IsNew() ? 0 : 1); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); result.AddCheckNull(field, new[] { "角色名称" }); result.AddCheckUsed(field, QcRoleEnum.lstRoleEnums, new[] { "角色名称" }, IsNew()?0:1); if (result.Count > 0) { return(result); } return(null); }
/// <summary> /// 检查指定的字段是否合法 /// </summary> /// <param name="field"></param> /// <returns></returns> public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); result.AddCheckNull(field, new[] { "权限枚举" }); result.AddCheckUsed(field, QcPermissionEnum.Permissions, new[] { "权限枚举" }, 0); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "算子编码", "规则名称", "是否可用", "检查项编码" }); result.AddCheckUsed(field, Parent.Nodes, new[] { "名称" }); if (result.Count > 0) { return(result); } return(null); }
//public bool CopyFrom(QcCheckProject src) // { // src.Nodes.ForEach(t => this.Nodes.Add( // t.CloneTo(this) // )); // return true; // } public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "方案名称", "是否默认", "是否概查" }); result.AddCheckUsed(field, this.PrjNodes(), new[] { "方案名称" }, 0); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "产品类别", "产品类别名称", "产品规格单位" }); result.AddCheckUsed(field, Parent.Nodes, new[] { "产品类别", "产品类别名称" }, 0); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "名称", "计分方式", "分组" }); result.AddCheckUsed(field, Parent.Nodes, new[] { "名称" }); result.AddCheckEnum(field, "计分方式", 计分方式Converter.计分方式s); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "任务名称", "任务负责人", "任务状态", "任务优先级" }); result.AddCheckUsed(field, Parent.Nodes, new[] { "任务名称" }, (IsNew() ? 0 : 1)); result.AddCheckEnum(field, "任务负责人", QcUser.GetUserIDsFromNames(任务负责人Converter.任务负责人)); result.AddCheckEnum(field, "任务状态", 任务状态Converter.任务状态); result.AddCheckEnum(field, "任务优先级", 任务优先级Converter.任务优先级); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "单位名称", "通讯地址", "等级", "类型", "行政隶属", "联系电话" }); result.AddCheckUsed(field, QcCompany.GetCompanys(), new[] { "单位名称" }, (IsNew() ? 0 : 1)); result.AddCheckEnum(field, "等级", QcCompanyDescriptor.资质等级s); result.AddCheckEnum(field, "类型", QcCompanyDescriptor.类型s); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "项目类型", "项目来源", "承担部门", "项目负责人", "项目名称" }); result.AddCheckUsed(field, QcProject.GetProjects(""), new[] { "项目名称" }, (IsNew() ? 0 : 1)); result.AddCheckEnum(field, "项目类型", 项目类型Converter.项目类型); result.AddCheckEnum(field, "项目来源", 项目来源Converter.项目来源); result.AddCheckEnum(field, "承担部门", 承担部门Converter.承担部门); result.AddCheckEnum(field, "项目负责人", QcUser.GetUserIDsFromNames(项目负责人Converter.项目负责人)); if (result.Count > 0) { return(result); } return(null); }
/// <summary> /// 检查指定的字段是否合法 /// </summary> /// <param name="field"></param> /// <returns></returns> public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); result.AddCheckNull(field, new[] { "用户名", "姓名", "所在分组", "性别" }); if (IsNew()) { result.AddCheckNull(field, new[] { "用户密码" }); } result.AddCheckUsed(field, QcUser.lstUsers, new[] { "用户名", "姓名" }, IsNew() ? 0 : 1); result.AddCheckEnum(field, "性别", 性别Converter.性别s); result.AddCheckEnum(field, "状态", 状态Converter.状态s); result.AddCheckEnum(field, "所在分组", from p in QcDepartment.Departments select p.Code); if (result.Count > 0) { return(result); } return(null); }
public override QcCheckResult Check(string field = null) { QcCheckResult result = new QcCheckResult(this); bool checkall = (field == null); result.AddCheckNull(field, new[] { "作业名称", "作业员", "作业状态", "作业优先级" }); result.AddCheckUsed(field, this.GetParent().Nodes, new[] { "作业名称" }, (IsNew() ? 0 : 1)); result.AddCheckEnum(field, "作业员", QcUser.GetUserIDsFromNames(作业员Converter.作业员)); result.AddCheckEnum(field, "作业状态", 作业状态Converter.作业状态); result.AddCheckEnum(field, "作业优先级", 作业优先级Converter.作业优先级); result.AddCheckEnum(field, "启动类型", 启动类型Converter.启动类型); result.AddCheckEnum(field, "产品级别编码", 产品级别编码Converter.级别s.Select(t => t.Code).ToArray()); result.AddCheckEnum(field, "产品类别编码", 产品类别编码Converter.类别s.Select(t => t.Code).ToArray()); result.AddCheckEnum(field, "方案ID", Get方案IDS()); if (result.Count > 0) { return(result); } return(null); }