コード例 #1
0
        /// <summary>
        /// 通过参数取得角色信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetRolesByParams(HttpContext context)
        {
            try
            {
                string name_startsWith = context.Request.QueryString["name_startsWith"];
                string maxRows         = context.Request.QueryString["maxRows"];
                string orgID           = context.Request.QueryString["orgID"];
                string strMain         = context.Request.QueryString["is_main"];

                if (string.IsNullOrEmpty(name_startsWith) || string.IsNullOrEmpty(maxRows) || string.IsNullOrEmpty(strMain))
                {
                    return("Fail");
                }
                else
                {
                    bool      isMain = strMain == "true" ? true : false;
                    RoleBLL   bll    = new RoleBLL();
                    DataTable dt     = bll.GetRolesByOrgParams(orgID, name_startsWith, maxRows);
                    return(EasyUIJsonConvert.GetAutoCompleteRoleJson(dt));
                }
            }
            catch (Exception ex)
            {
                DBManager.RecoreErrorProfile(ex, "RuleDesignHandler.GetRolesByParams", DBManager.GetCurrentUserAD());
                return("Fail");
            }
        }
コード例 #2
0
ファイル: FormDesignBLL.cs プロジェクト: zhangwxyc/BPM
        /// <summary>
        /// 取得所有控件
        /// </summary>
        /// <returns></returns>
        public string GetAllCountrol()
        {
            DataTable dt = dal.GetAllCountrol();

            if (dt != null)
            {
                return(EasyUIJsonConvert.CreateJsonParameters(dt, true, dt.Rows.Count));
            }
            return(string.Empty);
        }
コード例 #3
0
 /// <summary>
 /// 取得组织信息
 /// </summary>
 private string GetOrg(HttpContext context)
 {
     try
     {
         OrganizationBLL          bll     = new OrganizationBLL();
         IList <OrganizationInfo> orgList = bll.GetOrgList();
         DataTable dt   = DataTableExtension.ToDataTable <OrganizationInfo>(orgList);
         string    Id   = context.Request.Form["id"];
         string    text = context.Request.Form["text"];
         return(EasyUIJsonConvert.GetComboBoxJson(dt, Id, text));
     }
     catch (Exception ex)
     {
         DBManager.RecoreErrorProfile(ex, "RuleDesignHandler.GetOrganization", DBManager.GetCurrentUserAD());
         return("Fail");
     }
 }
コード例 #4
0
 private string GetOrgUsers(HttpContext context)
 {
     try
     {
         UserProfileBLL          bll      = new UserProfileBLL();
         IList <UserProfileInfo> userInfo = bll.GetAllUserProfile("");
         DataTable dt   = DataTableExtension.ToDataTable <UserProfileInfo>(userInfo);
         string    Id   = context.Request.Form["id"];
         string    text = context.Request.Form["text"];
         return(EasyUIJsonConvert.GetComboBoxJson(dt, Id, text));
     }
     catch (Exception ex)
     {
         DBManager.RecoreErrorProfile(ex, "RuleDesignHandler.GetOrgUsers", DBManager.GetCurrentUserAD());
         return("Fail");
     }
 }
コード例 #5
0
 /// <summary>
 /// 取得所有组织JSON
 /// </summary>
 /// <returns></returns>
 private string GetOrganization()
 {
     try
     {
         DepartmentBLL bll = new DepartmentBLL();
         //DataTable dt = bll.GetSortDepartment("0e4e8081-d9cb-4d32-9d6e-334e9a6d449c");
         DataTable dt = bll.GetOrgStruct();
         EasyUIJsonConvert.result = new System.Text.StringBuilder();
         EasyUIJsonConvert.GetTreeJsonByTable(dt, "DeptCode", "Department", "ParentCode", "R0");
         return(EasyUIJsonConvert.result.ToString());
     }
     catch (Exception ex)
     {
         DBManager.RecoreErrorProfile(ex, "RuleDesignHandler.GetOrganization", DBManager.GetCurrentUserAD());
         return("Fail");
     }
 }
コード例 #6
0
 /// <summary>
 /// 取得流程信息
 /// </summary>
 /// <returns></returns>
 private string GetProcess(HttpContext context)
 {
     try
     {
         ProcessTypeBLL          bll      = new ProcessTypeBLL();
         IList <ProcessTypeInfo> procList = bll.GetProcessType();
         DataTable dt   = DataTableExtension.ToDataTable <ProcessTypeInfo>(procList);
         string    Id   = context.Request.Form["id"];
         string    text = context.Request.Form["text"];
         return(EasyUIJsonConvert.GetComboBoxJson(dt, Id, text));
     }
     catch (Exception ex)
     {
         DBManager.RecoreErrorProfile(ex, "RuleDesignHandler.GetProcess", DBManager.GetCurrentUserAD());
         return("Fail");
     }
 }
コード例 #7
0
        /// <summary>
        /// 取得某个控件
        /// </summary>
        /// <returns></returns>
        private string GetControlByID()
        {
            string Id = HttpContext.Current.Request.Form["ID"];

            if (string.IsNullOrEmpty(Id))
            {
                return("Fail");
            }
            else
            {
                FormDesignBLL bll  = new FormDesignBLL();
                ControlInfo   info = bll.GetControlById(Id);
                if (info != null)
                {
                    return(EasyUIJsonConvert.Serialize <ControlInfo>(info));
                }
                else
                {
                    return("Fail");
                }
            }
        }