private IGrid <TBL_BALANCE_TRANSFER_LOGS> CreateExportMerchantReqGrid(string statusval)
        {
            var db = new DBContext();
            var transactionlistvalue = MerchantRequisitionReportViewModel.GetMerchantAllRequisitionReport(CurrentMerchant.MEM_ID.ToString(), statusval);
            IGrid <TBL_BALANCE_TRANSFER_LOGS> grid = new Grid <TBL_BALANCE_TRANSFER_LOGS>(transactionlistvalue);

            grid.ViewContext = new ViewContext {
                HttpContext = HttpContext
            };
            grid.Query = Request.QueryString;
            grid.Columns.Add(model => model.Serial_No).Titled("Se Id");
            //grid.Columns.Add(model => model.ToUser).Titled("To User");
            grid.Columns.Add(model => model.FromUser).Titled("User Name");
            grid.Columns.Add(model => model.REQUEST_DATE).Titled("Req Date").Formatted("{0:d}").MultiFilterable(true);
            grid.Columns.Add(model => model.REQUEST_TIME).Titled("Req Date").Formatted("{0:T}").MultiFilterable(true);
            grid.Columns.Add(model => model.AMOUNT).Titled("Amount");
            grid.Columns.Add(model => model.BANK_ACCOUNT).Titled("Bank Acnt");
            grid.Columns.Add(model => model.TRANSACTION_DETAILS).Titled("Pay Method");
            grid.Columns.Add(model => model.STATUS).Titled("STATUS");
            grid.Columns.Add(model => model.APPROVAL_DATE).Titled("Apprv/Decline Date").Formatted("{0:d}").MultiFilterable(true);
            grid.Columns.Add(model => model.APPROVED_BY).Titled("Apprv By");
            grid.Pager = new GridPager <TBL_BALANCE_TRANSFER_LOGS>(grid);
            grid.Processors.Add(grid.Pager);
            grid.Pager.RowsPerPage = 6;

            foreach (IGridColumn column in grid.Columns)
            {
                column.Filter.IsEnabled = true;
                column.Sort.IsEnabled   = true;
            }

            return(grid);
        }
        public PartialViewResult IndexGrid(string search = "")
        {
            var db = new DBContext();

            if (search == "")
            {
                var transactionlistvalue = MerchantRequisitionReportViewModel.GetMerchantAllRequisitionReport(CurrentMerchant.MEM_ID.ToString(), search);
                return(PartialView("IndexGrid", transactionlistvalue));
            }
            else
            {
                //var transactionlistvalue = (from x in db.TBL_BALANCE_TRANSFER_LOGS
                //                            join y in db.TBL_MASTER_MEMBER on x.FROM_MEMBER equals y.MEM_ID
                //                            where x.FROM_MEMBER == CurrentMerchant.MEM_ID && x.STATUS==search
                //                            select new
                //                            {
                //                                Touser = "******",
                //                                transid = x.TransactionID,
                //                                FromUser = y.UName,
                //                                REQUEST_DATE = x.REQUEST_DATE,
                //                                AMOUNT = x.AMOUNT,
                //                                BANK_ACCOUNT = x.BANK_ACCOUNT,
                //                                TRANSACTION_DETAILS = x.TRANSACTION_DETAILS,
                //                                STATUS = x.STATUS,
                //                                APPROVED_BY = x.APPROVED_BY,
                //                                APPROVAL_DATE = x.APPROVAL_DATE,
                //                                SLN = x.SLN
                //                            }).AsEnumerable().Select((z, index) => new TBL_BALANCE_TRANSFER_LOGS
                //                            {
                //                                Serial_No = index + 1,
                //                                ToUser = z.Touser,
                //                                TransactionID = z.transid,
                //                                FromUser = z.FromUser,
                //                                AMOUNT = z.AMOUNT,
                //                                REQUEST_DATE = z.REQUEST_DATE,
                //                                BANK_ACCOUNT = z.BANK_ACCOUNT,
                //                                TRANSACTION_DETAILS = z.TRANSACTION_DETAILS,
                //                                STATUS = z.STATUS,
                //                                APPROVED_BY = z.APPROVED_BY,
                //                                APPROVAL_DATE = z.APPROVAL_DATE,
                //                                SLN = z.SLN
                //                            }).ToList();
                var transactionlistvalue = MerchantRequisitionReportViewModel.GetMerchantAllRequisitionReport(CurrentMerchant.MEM_ID.ToString(), search);
                return(PartialView("IndexGrid", transactionlistvalue));
            }
        }