Beispiel #1
0
        public ActionResult Index(int?p)
        {
            Pager pager = new Pager();

            pager.table      = "CMSJixiao";
            pager.strwhere   = "1=1";
            pager.PageSize   = 20;
            pager.PageNo     = p ?? 1;
            pager.FieldKey   = "JixiaoId";
            pager.FiledOrder = "JixiaoId Desc";
            pager            = CMSService.SelectAll("Jixiao", pager);

            List <JixiaoDto> list = new List <JixiaoDto>();

            foreach (DataRow dr in pager.EntityDataTable.Rows)
            {
                JixiaoDto dto = JixiaoMapping.getDTO(dr);
                list.Add(dto);
            }
            pager.Entity = list.AsQueryable();

            ViewBag.PageNo          = p ?? 1;
            ViewBag.PageCount       = pager.PageCount;
            ViewBag.RecordCount     = pager.Amount;
            ViewBag.Message         = pager.Amount;
            ViewBag.ZongCount       = CMSService.GetSomeValue("Jixiao", "CMSJixiao", "1=1", "Count(JixiaoId)");
            ViewBag.ShenheCount     = CMSService.GetSomeValue("Jixiao", "CMSJixiao", "JixiaoStatus='已审核'", "Count(JixiaoId)");
            ViewBag.WeishenheCount  = CMSService.GetSomeValue("Jixiao", "CMSJixiao", "JixiaoStatus='未通过'", "Count(JixiaoId)");
            ViewBag.ZongFenshu      = CMSService.GetSomeValue("Jixiao", "CMSJixiao", "1=1", "SUM(JixiaoFenshu)");
            ViewBag.ShenheFenshu    = CMSService.GetSomeValue("Jixiao", "CMSJixiao", "JixiaoStatus='已审核'", "SUM(JixiaoFenshu)");
            ViewBag.WeishenheFenshu = CMSService.GetSomeValue("Jixiao", "CMSJixiao", "JixiaoStatus='未通过'", "SUM(JixiaoFenshu)");
            ViewData["Month"]       = CommonTools.GetMontList();

            return(View(pager.Entity));
        }
Beispiel #2
0
        public ActionResult Index()
        {
            int   CustomerCount   = CMSService.GetSomeValue("CustomerDto", "CMSCustomer", "1=1", "Count(CustomerId)");
            int   JianyanCount    = CMSService.GetSomeValue("JianyanDto", "CMSJianyan", "1=1", "Count(JianyanId)");
            int   ChufangCount    = CMSService.GetSomeValue("ChufangDto", "CMSChufang", "1=1", "Count(ChufangId)");
            int   TizhiCount      = CMSService.GetSomeValue("TizhiDto", "CMSTizhi", "1=1", "Count(TizhiId)");
            int   XueyaCount      = CMSService.GetSomeValue("XueyaDto", "CMSXueya", "1=1", "Count(XueyaId)");
            float JixiaoCount     = CMSService.GetSomeValue("JixiaoDto", "CMSJixiao", "1=1", "Count(JixiaoId)");
            float JixiaoPassCount = CMSService.GetSomeValue("JixiaoDto", "CMSJixiao", "JixiaoStatus='已审核'", "Count(JixiaoId)");
            float JixiaoPersent   = (JixiaoPassCount / JixiaoCount) * 100;



            ViewBag.CustomerCount   = CustomerCount;
            ViewBag.JianyanCount    = JianyanCount;
            ViewBag.ChufangCount    = ChufangCount;
            ViewBag.TizhiCount      = TizhiCount;
            ViewBag.XueyaCount      = XueyaCount;
            ViewBag.JixiaoCount     = JixiaoCount;
            ViewBag.JixiaoPassCount = JixiaoPassCount;
            ViewBag.JixiaoPersent   = JixiaoPersent.ToString() + "%";
            return(View());
            //return RedirectToAction("Index","Customer", new { category = "全部", guidang = "0" });
        }