protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e) { //GEtting the filter from the page string filter = string.Empty; int totalCount = 1; //Fetching the corresponding list //in this test will take a list of News //ListRequest request = new ListRequest(); LeavePaymentsListRequest request = GetLeavePaymentRequest(); request.Filter = ""; request.Size = e.Limit.ToString(); request.StartAt = e.Start.ToString(); ListResponse <LeavePayment> routers = _payrollService.ChildGetAll <LeavePayment>(request); if (!routers.Success) { Common.errorMessage(routers); return; } this.Store1.DataSource = routers.Items; e.Total = routers.count; this.Store1.DataBind(); }
private LeavePaymentsListRequest GetLeavePaymentRequest() { LeavePaymentsListRequest req = new LeavePaymentsListRequest(); if (!string.IsNullOrEmpty(employeeFilter.Text) && employeeFilter.Value.ToString() != "0") { req.EmployeeId = Convert.ToInt32(employeeFilter.Value); } else { req.EmployeeId = 0; } req.Size = "2000"; req.StartAt = "0"; req.Filter = ""; return(req); }