コード例 #1
0
        public PartialViewResult RetailerRequisitionGrid(string search = "", string Status = "")
        {
            if (search == "" && Status == "")
            {
                var transactionlist = SuperRequisitionModel.GetAllRetailerRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Status);
                return(PartialView("RetailerRequisitionGrid", transactionlist));
            }
            else if (search == "" && Status != "")
            {
                var transactionlist = SuperRequisitionModel.GetAllRetailerRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Status);
                return(PartialView("RetailerRequisitionGrid", transactionlist));
            }
            else if (search != "" && Status != "")
            {
                var transactionlist = SuperRequisitionModel.GetMerchantRequisitionReport(search, Status);
                return(PartialView("RetailerRequisitionGrid", transactionlist));
            }
            else if (search != "" && Status == "")
            {
                var transactionlist = SuperRequisitionModel.GetMerchantRequisitionReport(search, Status);
                return(PartialView("RetailerRequisitionGrid", transactionlist));
            }
            else
            {
                var transactionlist = "";
                return(PartialView("RetailerRequisitionGrid", transactionlist));
            }

            //var RetailerList = SuperRequisitionModel.GetAllRetailerRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Status);
            //return PartialView("RetailerRequisitionGrid", RetailerList);
        }
コード例 #2
0
        private IGrid <TBL_BALANCE_TRANSFER_LOGS> CreateExportSuperMerchantLevelGrid(string DisId, string statusval)
        {
            var db = new DBContext();
            var Adminrequisition = new List <TBL_BALANCE_TRANSFER_LOGS>();

            if (statusval == "" && DisId == "")
            {
                Adminrequisition = SuperRequisitionModel.GetAllRetailerRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), statusval);
            }
            else if (statusval != "" && DisId == "")
            {
                Adminrequisition = SuperRequisitionModel.GetAllRetailerRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), statusval);
            }
            else if (statusval == "" && DisId != "")
            {
                Adminrequisition = SuperRequisitionModel.GetMerchantRequisitionReport(DisId, statusval);
            }
            else if (statusval != "" && DisId != "")
            {
                Adminrequisition = SuperRequisitionModel.GetMerchantRequisitionReport(DisId, statusval);
            }
            IGrid <TBL_BALANCE_TRANSFER_LOGS> grid = new Grid <TBL_BALANCE_TRANSFER_LOGS>(Adminrequisition);

            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.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);
        }