コード例 #1
0
        public static int GetStatusByRoleId(int roleId)
        {
            int status = 0;
            SpecialAuditWFTemplate template = null;

            try
            {
                template = XmlDeSerialize <SpecialAuditWFTemplate>(SpecialAuditWF_ConfigFile);
                status   = (from d in template.AuditItems where d.RoleId == roleId select d.Status).FirstOrDefault();
            }
            catch { }

            return(status);
        }
コード例 #2
0
        /// <summary>
        /// 获取工作流程
        /// </summary>
        /// <param name="workStatus">流程编号</param>
        /// <returns></returns>
        public static WorkFlowType GetWorkFlowId(int workStatus, int companyTypeId)
        {
            WorkFlowType           result   = null;
            SpecialAuditWFTemplate template = null;

            try
            {
                template = XmlDeSerialize <SpecialAuditWFTemplate>(SpecialAuditWF_ConfigFile);
                result   = (from d in template.WorkFlowTypes where d.WorkStatus == workStatus && d.CompanyId == companyTypeId select d).FirstOrDefault();
            }
            catch {}

            return(result);
        }
コード例 #3
0
        public static List <int> GetOrgTypeIdByRoleId(int roleId)
        {
            List <int>             orgTypeId = new List <int>();
            SpecialAuditWFTemplate template  = null;

            try
            {
                template  = XmlDeSerialize <SpecialAuditWFTemplate>(SpecialAuditWF_ConfigFile);
                orgTypeId = (from d in template.AuditItems where d.RoleId == roleId select d.OrgTypeId).ToList();
            }
            catch { }

            return(orgTypeId);
        }