Exemplo n.º 1
0
        public ViewResult Payments(int customerid)
        {
            ViewBag.CurrentFilter = customerid;
            var Payments = from s in serviceProxy.GetPayments(customerid)
                           select s;

            SCustomer co = serviceProxy.GetCustomer(customerid);

            ViewData["customername"] = co.first_name + " " + co.last_name;

            int pageSize   = 1000;
            int pageNumber = 1;

            return(View(Payments.ToPagedList(pageNumber, pageSize)));
        }
Exemplo n.º 2
0
        //
        // GET: /Payment/

        public ViewResult Index(string sortOrder, string currentFilter, string searchString, int?page)
        {
            ViewBag.CurrentSort  = sortOrder;
            ViewBag.NameSortParm = String.IsNullOrEmpty(sortOrder) ? "Name desc" : "";
            ViewBag.DateSortParm = sortOrder == "Date" ? "Date desc" : "Date";

            if (Request.HttpMethod == "GET")
            {
                searchString = currentFilter;
            }
            else
            {
                page = 1;
            }
            ViewBag.CurrentFilter = searchString;

            var Payments = from s in serviceProxy.GetPayments(int.Parse(searchString))
                           select s;

            int pageSize   = 10;
            int pageNumber = (page ?? 1);

            return(View(Payments.ToPagedList(pageNumber, pageSize)));
        }