示例#1
0
        public ActionResult Index(string customerid, string paytype, int status = -1, int p = 1)
        {
            ReservationsSearchEntity search = new ReservationsSearchEntity();

            search.CustomerID = customerid.ToLong(0);
            search.PayType    = paytype;
            search.Status     = status;

            int count = ReservationsService.GetReservationsCount(search);

            PagerInfo pager = new PagerInfo();

            pager.PageIndex = p;
            pager.PageSize  = PAGESIZE;
            pager.SumCount  = count;
            pager.URL       = "/Rev";

            List <CustomerEntity> customers = CustomerService.GetCustomerList();
            List <BaseDataEntity> paytypes  = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "P00").ToList();

            ViewBag.Search = search;
            List <ReservationsEntity> mList = ReservationsService.GetReservationsByRule(search, pager);

            ViewBag.Reservations = mList;
            ViewBag.Pager        = pager;
            ViewBag.Customers    = customers;
            ViewBag.PayTypes     = paytypes;

            return(View());
        }