Ejemplo n.º 1
0
        //
        // GET: /Home/

        public ActionResult Index(int?pageindex)
        {
            ViewBag.MenuGroup = "EI";
            if (!BLLMEnterpriseAdmin.IsLogin())
            {
                return(Redirect("~/AdminAccount/Login"));
            }
            ViewBag.MenuTitle = "企业列表";


            PageHelper page = new PageHelper();

            if (!pageindex.HasValue)
            {
                pageindex = 1;
            }
            page.TotalCount  = BLLEnterprise.GetEnterprise().Count;
            page.PageNext    = pageindex.Value + 1;
            page.PageCurrent = pageindex.Value;
            page.PagePre     = pageindex.Value - 1;
            ViewBag.Page     = page;
            List <Enterprise> EnterpriseList = BLLEnterprise.GetEnterpriseList(page.PageCurrent - 1, page.PageSize);

            return(View(EnterpriseList));
        }
Ejemplo n.º 2
0
        //
        // GET: /Enterprise/

        public ActionResult Index(string name)
        {
            Enterprise entreprise = BLLEnterprise.GetEnterprise(name);

            if (null != entreprise)
            {
                ViewBag.Enterprise = entreprise;
            }
            else
            {
                return(Redirect("~/Enterprise/" + name + "/NotExists"));
            }

            ViewBag.EPmenu = "EPI";
            ViewBag.title  = name == null ? "多企业用户管理系统" : name;

            List <EnterpriseCases> EnterpriseCaseList = BLLEnterpriseCases.GetEnterpriseCasesList(entreprise.EnterpriseID, 0, 50);

            ViewBag.EnterpriseCaseList = EnterpriseCaseList;

            List <EnterpriseDynamic> EnterpriseDynamicList = BLLEnterpriseDynamic.EnterpriseDynamic(entreprise.EnterpriseID, 0, 50);

            ViewBag.EnterpriseDynamicList = EnterpriseDynamicList;

            return(View());
        }
Ejemplo n.º 3
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            ViewBag.Menu = "IX";
            List <MEnterpriseCases> MElist = BLLMEnterpriseCases.GetMEnterpriseCases();

            ViewBag.MEnterprseList = MElist;
            List <Enterprise> Elist = BLLEnterprise.GetEnterprise();

            ViewBag.EnterprseList = Elist;
            return(View());
        }
Ejemplo n.º 4
0
        public ActionResult EPBrief(string name)
        {
            Enterprise entreprise = BLLEnterprise.GetEnterprise(name);

            if (null != entreprise)
            {
                ViewBag.Enterprise = entreprise;
            }
            else
            {
                return(Redirect("~/Enterprise/" + name + "/NotExists"));
            }

            ViewBag.EPmenu = "EPB";
            ViewBag.title  = name == null ? "多企业用户管理系统" : name;
            return(View());
        }
Ejemplo n.º 5
0
        public ActionResult EPDynamic(string name, int?enterpriseDynamicID, int?currentPage)
        {
            Enterprise entreprise = BLLEnterprise.GetEnterprise(name);

            if (null != entreprise)
            {
                ViewBag.Enterprise = entreprise;
            }
            else
            {
                return(Redirect("~/Enterprise/" + name + "/NotExists"));
            }

            ViewBag.EPmenu = "EPD";
            ViewBag.title  = name == null ? "多企业用户管理系统" : name;

            if (enterpriseDynamicID != null)
            {
                EnterpriseDynamic dynamic = BLLEnterpriseDynamic.EnterpriseDynamicByEnterpriseDynamicID(enterpriseDynamicID.Value);
                if (dynamic.Enterprise.EnterpriseID == entreprise.EnterpriseID)
                {
                    ViewBag.EnterpriseDynamic = dynamic;
                }

                return(View("/Views/Enterprise/EPDynamicDetail.aspx"));
            }

            int page = 1;

            if (currentPage != null)
            {
                page = currentPage.Value;
            }

            List <EnterpriseDynamic> dynamicList = BLLEnterpriseDynamic.EnterpriseDynamics(entreprise.EnterpriseID);

            ViewBag.CurrentPage = page;
            ViewBag.TotalPage   = dynamicList.Count() / 9 + (dynamicList.Count() % 9 == 0 ? 0 : 1);

            List <EnterpriseDynamic> list = BLLEnterpriseDynamic.EnterpriseDynamic(entreprise.EnterpriseID, page - 1, 9);

            return(View(list));
        }
Ejemplo n.º 6
0
        public string AddEnterpriseInfo(int id)
        {
            Enterprise    enterprise = BLLEnterprise.GetEnterprise(id);
            StringBuilder builder    = new StringBuilder();

            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>企业名称</td><td class='tdContent'>" + enterprise.EnterpriseName ?? "" + "</td></tr>");
            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>企业电话</td><td class='tdContent'>" + enterprise.EnterpriseTelphoneNumber ?? "" + "</td></tr>");
            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>企业邮箱</td><td class='tdContent'>" + enterprise.EnterpriseEmail ?? "" + "</td></tr>");
            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>企业地址</td><td class='tdContent'>" + enterprise.EnterpriseAddress ?? "" + "</td></tr>");
            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>版权声明</td><td class='tdContent'>" + enterprise.EnterpriseRight ?? "" + "</td></tr>");
            //builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>注册时间</td><td class='tdContent'>" + enterprise.EnterpriseRegistTime.HasValue ? enterprise.EnterpriseRegistTime.Value.ToString("yyyy-MM-dd") : "" + "</td></tr>");
            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>企业说明</td><td class='tdContent'>" + enterprise.EnterpriseBriefShort ?? "" + "</td></tr>");
            builder.Append("<tr class='enterpriseinfo'><td style='width: 100px;'>企业简介</td><td class='tdContent contentBriefHtmlToTxt' id='contentBriefHtmlToTxt'>" + enterprise.EnterpriseBrief ?? "" + "</td></tr>");

            builder.Append("<tr style=\"display:none;\"><td></td><td><input type='hidden' name='ename' id='ename' value='" + enterprise.EnterpriseName + "' />");
            builder.Append("<input type='hidden' name='eshort' id='eshort' value='" + enterprise.EnterpriseBriefShort + "' />");
            builder.Append("<input type='hidden' name='eurl' id='eurl' value='" + enterprise.EnterpriseUrl + "' /></td></tr>");
            //builder.Append("<input type='hidden' name='imgurl' value='" + BLLEnterprise.ServerDns + enterprise. + "' />");


            return(builder.ToString());
        }