public PartialViewResult DailyTransactiongrid(string search = "")
        {
            var db = new DBContext();
            var transactionlistvalue = MerchantDailyTransactionClass.GetTransactionReport(search, CurrentMerchant.MEM_ID);

            return(PartialView("DailyTransactiongrid", transactionlistvalue));
        }
        private IGrid <TBL_ACCOUNTS> CreateExportMerchantTableGrid(string statusval)
        {
            var  db = new DBContext();
            var  transactionlistvalue = MerchantDailyTransactionClass.GetTransactionReport(statusval, CurrentMerchant.MEM_ID);
            long mem_id = long.Parse(CurrentMerchant.MEM_ID.ToString());

            IGrid <TBL_ACCOUNTS> grid = new Grid <TBL_ACCOUNTS>(transactionlistvalue);

            grid.ViewContext = new ViewContext {
                HttpContext = HttpContext
            };
            grid.Query = Request.QueryString;

            grid.Columns.Add(model => model.SerialNo).Titled("Sln No.");
            grid.Columns.Add(model => model.UserName).Titled("User Name");
            //grid.Columns.Add(model => model.MEMBER_TYPE).Titled("Merchant Type");
            grid.Columns.Add(model => model.TRANSACTION_TYPE).Titled("Transaction Type");
            grid.Columns.Add(model => model.TRANSACTION_DATE).Titled("Transaction Date").Formatted("{0:d}");
            grid.Columns.Add(model => model.DR_CR).Titled("DR/CR");
            grid.Columns.Add(model => model.AMOUNT).Titled("Amount");
            //grid.Columns.Add(model => model.NARRATION).Titled("Narration");
            grid.Columns.Add(model => model.OPENING).Titled("Opening");
            grid.Columns.Add(model => model.CLOSING).Titled("Closing");
            grid.Columns.Add(model => model.COMM_AMT).Titled("Commission Amt.");
            grid.Pager = new GridPager <TBL_ACCOUNTS>(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);
        }