コード例 #1
0
        public ActionResult SettlementReport(DynamicReportFilter model)
        {
            // Start User Id from mobile number
            var list = _buss.GetSearchUserList(model.MobileNumber, "mobileno");

            if (string.IsNullOrEmpty(model.MobileNumber))
            {
                list = null;
            }
            if (list != null)
            {
                var userinfo = list.FirstOrDefault();
                if (userinfo == null)
                {
                    ViewBag.EmptyMessage = "True";
                    return(View());
                }
                model.UserId = userinfo.UserID.ToString();
            }
            else
            {
                ViewBag.EmptyMessage = "True";
                return(View());
            }
            //Ends

            DynamicReportFilter models = new DynamicReportFilter();

            models = model.MapObject <DynamicReportFilter>();

            List <DynamicReportCommon> dynamicReportCommons = _dynamicReport.GetSettlementReport(models);
            List <DynamicReportModel>  reportModel          = dynamicReportCommons.MapObjects <DynamicReportModel>();

            foreach (var item in reportModel)
            {
                item.Action = StaticData.GetActions("PendingTransaction", item.AgentId.EncryptParameter(), this, "", "", item.TxnId);
            }
            //Column Creator
            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("TxnDate", "Txn Date");
            param.Add("TxnType", "Txn Type");
            param.Add("Remarks", "Remarks");
            param.Add("Debit", "Debit");
            param.Add("Credit", "Credit");
            param.Add("Amount", "Amount");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "", "datatable-total", true);

            ViewData["grid"] = grid;

            return(View());
        }
コード例 #2
0
        public ActionResult SettlementReport(string MobileNum)
        {
            //Start Search UserId from Mobile Number
            IWalletUserBusiness _walletUserBusiness = new WalletUserBusiness();
            var userinfo = _walletUserBusiness.UserInfo(MobileNum);

            if (string.IsNullOrEmpty(userinfo.UserId))
            {
                ViewBag.EmptyMessage = "True";
                return(View());
            }

            string UserId = userinfo.UserId.ToString();
            //Ends
            List <DynamicReportCommon> dynamicReportCommons = _dynamicReport.GetSettlementReport(UserId);
            List <DynamicReportModel>  reportModel          = dynamicReportCommons.MapObjects <DynamicReportModel>();

            foreach (var item in reportModel)
            {
                item.Action = StaticData.GetActions("PendingTransaction", item.AgentId.EncryptParameter(), this, "", "", item.TxnId);
            }
            //Column Creator
            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("TxnDate", "Txn Date");
            param.Add("TxnType", "Txn Type");
            param.Add("Remarks", "Remarks");
            param.Add("Debit", "Debit");
            param.Add("Credit", "Credit");
            param.Add("Amount", "Amount");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "");

            ViewData["grid"] = grid;

            return(View());
        }