//public ActionResult Filter(Models.PaymentListToCustomerModel data)
        public ActionResult Filter(string SearchString)
        {
            //if (data.SearchString == null) data.SearchString = "";
            if (SearchString == null)
            {
                SearchString = "";
            }

            //List<CLayer.OfflineBooking> users = BLayer.B2B.SearchPaymentCustomerList(data.SearchString, 0, 25);
            List <CLayer.OfflineBooking> users = BLayer.B2B.SearchPaymentCustomerList(SearchString, 0, 25);

            //List<CLayer.User> users = BLayer.User.GetAllCustomerForSearch((int)CLayer.ObjectStatus.StatusType.Active, data.SearchString, data.SearchValue, (int)CLayer.Role.Roles.Customer, 0, 25);
            ViewBag.Filter = new Models.PaymentListToCustomerModel();
            Models.PaymentListToCustomerModel forPager = new Models.PaymentListToCustomerModel()
            {
                //SearchString = data.SearchString,
                SearchString = SearchString,
                userlist     = users,
                TotalRows    = 0,
                Limit        = 25,
                currentPage  = 1
            };
            if (users.Count > 0)
            {
                forPager.TotalRows = users[0].TotalRows;
            }
            ViewBag.Filter = forPager;
            return(PartialView("_List", users));
        }
        public ActionResult Pager1(Models.PaymentListToCustomerModel data)
        {
            if (data.SearchString == null)
            {
                data.SearchString = "";
            }
            List <CLayer.OfflineBooking> users = BLayer.B2B.SearchPaymentCustomerList(data.SearchString, (data.currentPage - 1) * data.Limit, data.Limit);

            ViewBag.Filter = new Models.PaymentListToCustomerModel();
            Models.PaymentListToCustomerModel forPager = new Models.PaymentListToCustomerModel()
            {
                Status       = (int)CLayer.ObjectStatus.StatusType.Active,
                SearchString = data.SearchString,
                SearchValue  = data.SearchValue,
                userlist     = users,
                TotalRows    = 0,
                Limit        = 25,
                currentPage  = data.currentPage
            };
            if (users.Count > 0)
            {
                forPager.TotalRows = users[0].TotalRows;
            }
            ViewBag.Filter = forPager;
            return(PartialView("_List", users));
        }
        // GET: /Admin/PaymentListToCustomer
        public ActionResult Index()
        {
            Session["PaymentGuid"] = "";
            Models.PaymentListToCustomerModel data = new Models.PaymentListToCustomerModel();
            data.Limit = ROWS_PER_PAGE;
            //data.Start = 0;
            //data.SearchItem = 0;
            //data.Status = 1;
            data.Status = (int)CLayer.ObjectStatus.StatusType.Active;
            //data.TotalRows = 0;
            //int totalRows = 0;
            data.SearchString = "";
            if (data.SearchString == null)
            {
                data.SearchString = "";
            }
            List <CLayer.OfflineBooking> users = BLayer.B2B.SearchPaymentCustomerList(data.SearchString, 0, 25);

            data.userlist  = users;
            data.TotalRows = 0;
            if (users.Count > 0)
            {
                data.TotalRows = users[0].TotalRows;
            }
            //data.SearchStatus = data.Status;

            data.SearchValue = 1;
            //data.ItemSearch = data.SearchItem;
            data.currentPage = 1;
            ViewBag.Filter   = data;
            return(View(data));
        }