protected void BindVoucherList() { if (string.IsNullOrEmpty(this.voucherName) && string.IsNullOrEmpty(this.voucherOrder) && !this.voucherstatus.HasValue && !this.VoucherId.HasValue) { return; } DbQueryResult vouchersList = VoucherHelper.GetVouchersList(new VoucherItemInfoQuery { VoucherName = this.voucherName, OrderId = this.voucherOrder, VoucherId = this.VoucherId, VoucherStatus = this.voucherstatus, PageIndex = this.pager.PageIndex, PageSize = this.pager.PageSize, SortBy = "GenerateTime", SortOrder = SortAction.Desc }); this.pager.TotalRecords = vouchersList.TotalRecords; this.grdVouchers.DataSource = vouchersList.Data; this.grdVouchers.DataBind(); }