Ejemplo n.º 1
0
        /// <summary>
        /// 根据单位代码构建单位树
        /// </summary>
        /// <param name="id">单位代码</param>
        public ActionResult TreeOrgList(string id)
        {
            ////IsLogin();

            CQGJOrgIndexViewData viewData = new CQGJOrgIndexViewData();
            try
            {
                string strHtml = "";
                Passport.Bussiness.Global global = new Passport.Bussiness.Global();
                if (id == "50000000100016")
                {
                    global.CreateAllOwnedOrgHtml(ref strHtml, "", "treeuserlist");
                }
                else
                {
                    global.CreateAllOwnedOrgHtml(ref strHtml, id, "treeuserlist");
                }
                viewData.strHtml = strHtml;
            }
            catch
            {
            }
            return View(viewData);
        }
Ejemplo n.º 2
0
        public ActionResult OrgIndex_Left()
        {
            //IsLogin();
            b01 LoginOrg = (b01)HttpContext.Session["Org"];
            bool bAdmin = false;
            //判断是否是市委组织部
            if (Convert.ToInt32(HttpContext.Session["OrgType"]) == 1)
            { bAdmin = true; }
            CQGJOrgIndexViewData viewData = new CQGJOrgIndexViewData();
            try
            {
                if (bAdmin)
                {
                    //获取OrgType为4的单位,也即市委直管单位
                    List<b01> org4 = (from b in CQGJ.b01
                                      from be in CQGJ.b01Expansion
                                      where b == be.b01 && be.OrgType == 4
                                      select b).ToList();
                    viewData.Org4 = org4;
                    //获取OrgType为3的单位,也即施教机构
                    List<b01> org1 = (from b in CQGJ.b01
                                      from be in CQGJ.b01Expansion
                                      where b == be.b01 && be.OrgType == 3
                                      select b).ToList();
                    viewData.OrgTs = org1;
                    //获取OrgType为2的单位,也即下级组织部
                    List<b01> org2 = (from b in CQGJ.b01
                                      from be in CQGJ.b01Expansion
                                      where b == be.b01 && be.OrgType == 2
                                      select b).ToList();
                    viewData.OrgZs = org2;
                }
                List<b01> org = new List<b01>();
                string strHtml = "";
                if (bAdmin)
                {
                    Passport.Bussiness.Global global = new Passport.Bussiness.Global();
                    //global.CreateAllOwnedOrgHtml(ref strHtml, LoginOrg.b0111);
                    global.CreateAllOwnedOrgHtml(ref strHtml, "", "orginfo");
                }
                else
                {
                    Passport.Bussiness.Global global = new Passport.Bussiness.Global();
                    //global.CreateAllOwnedOrgHtml(ref strHtml, LoginOrg.b0111);
                    global.CreateAllOwnedOrgHtml(ref strHtml, "", "orginfo");
                }
                viewData.strHtml = strHtml;
            }
            catch
            {
            }

            return View( viewData);
        }
Ejemplo n.º 3
0
 public ActionResult RoleIndex_Left()
 {
     //IsLogin();
     CQGJOrgIndexViewData viewData = new CQGJOrgIndexViewData();
     try
     {
         //获取OrgType为4的单位,也即市委直管单位
         List<b01> org4 = (from b in CQGJ.b01
                           from be in CQGJ.b01Expansion
                           where b == be.b01 && be.OrgType == 4
                           select b).ToList();
         viewData.Org4 = org4;
         //获取OrgType为3的单位,也即施教机构
         List<b01> org1 = (from b in CQGJ.b01
                           from be in CQGJ.b01Expansion
                           where b == be.b01 && be.OrgType == 3
                           select b).ToList();
         viewData.OrgTs = org1;
         //获取OrgType为2的单位,也即下级组织部
         List<b01> org2 = (from b in CQGJ.b01
                           from be in CQGJ.b01Expansion
                           where b == be.b01 && be.OrgType == 2
                           select b).ToList();
         viewData.OrgZs = org2;
     }
     catch
     {
     }
     return View(viewData);
 }