예제 #1
0
        public JsonResult GetCustomerPayments(string code, int idnt, string start, string stop, string filter = "")
        {
            StationsService Service = new StationsService();

            if (string.IsNullOrEmpty(filter))
            {
                filter = "";
            }

            return(Json(Service.GetCustomerPayments(Service.GetStation(code), DateTime.Parse(start), DateTime.Parse(stop), new Customers(idnt), filter)));
        }
        public JsonResult GetCustomerPayments(string date1, string date2, string stations, string customers, string filter, StationsService service)
        {
            DateTime xdate1 = DateTime.Parse(date1);
            DateTime xdate2 = DateTime.Parse(date2);

            if (string.IsNullOrEmpty(customers))
            {
                customers = "";
            }

            if (string.IsNullOrEmpty(filter))
            {
                filter = "";
            }

            List <CustomersPayments> payments = new List <CustomersPayments>(service.GetCustomerPayments(xdate1, xdate2, stations, customers, filter));

            return(Json(payments));
        }