Ejemplo n.º 1
0
        public async System.Threading.Tasks.Task <JsonResult> ValidMobileNo(string mobileNum)
        {
            IWalletUserBusiness _walletUserBusiness = new WalletUserBusiness();
            var userinfo = _walletUserBusiness.UserInfo(mobileNum);
            int Code     = 0;

            if (string.IsNullOrEmpty(userinfo.UserId))
            {
                Code = 1;
            }

            return(Json(new { Code }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult ManualCommissionReport(string mobileno)
        {
            IWalletUserBusiness _walletUserBusiness = new WalletUserBusiness();
            var userinfo = _walletUserBusiness.UserInfo(mobileno);

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

            string UserId = userinfo.UserId.ToString();

            //Ends
            List <DynamicReportCommon> dynamicReportCommons = _dynamicReport.GetManualCommissionReport(UserId);
            List <DynamicReportModel>  reportModel          = dynamicReportCommons.MapObjects <DynamicReportModel>();
            Decimal Total_Commission = 0;

            foreach (var item in reportModel)
            {
                Total_Commission = Total_Commission + Convert.ToDecimal(item.CommissionEarned);
            }

            ViewBag.totalcommission = (float)Total_Commission;

            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("TxnDate", "Txn Date");
            param.Add("TxnType", "Txn Type");
            param.Add("Remarks", "Remarks");
            param.Add("ProductName", "Product Name");
            param.Add("CommissionEarned", "Commission Earned");
            param.Add("Amount", "Amount");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "");

            ViewData["grid"] = grid;

            return(View());
        }
Ejemplo n.º 3
0
        public ActionResult CardUser(CardModel cardModel)
        {
            cardModel.Balance = Session["Balance"].ToString();
            var cardType = _card.GetCardType();

            foreach (var item in cardType.Where(kvp => kvp.Value.ToUpper() == "VIRTUAL CARD" || kvp.Value.ToUpper() == "PREPAID CARD").ToList())
            {
                cardType.Remove(item.Key);
            }
            cardModel.CardTypeList = ApplicationUtilities.SetDDLValue(cardType as Dictionary <string, string>, cardModel.CardType, "--Card Type--");

            if (cardModel.Type == "re")
            {
                ModelState.Remove("MobileNo");
            }

            if (string.IsNullOrEmpty(cardModel.CardNo))
            {
                ModelState.AddModelError("CardNo", "Card Number Required!");
                return(View("CardUser", cardModel));
            }

            else
            {
                IWalletUserBusiness _walletUserBusiness = new WalletUserBusiness();
                var userinfo = _walletUserBusiness.UserInfo(cardModel.MobileNo);
                if (string.IsNullOrEmpty(userinfo.UserId))
                {
                    ModelState.AddModelError("MobileNo", "Invalid Mobile Number");
                    return(View("CardUser", cardModel));
                }
            }

            cardModel.ActionUser = Session["UserId"].ToString();
            CardCommon cardCommon = cardModel.MapObject <CardCommon>();
            //CommonDbResponse dbResponse = _card.CardApproval(cardCommon);
            CommonDbResponse dbResponse = _card.CardUser(cardCommon);

            dbResponse.SetMessageInTempData(this, "Index");
            return(RedirectToAction("Index"));
        }
        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());
        }