Esempio n. 1
0
        public ActionResult CardApprovalDetail(CardModel cardModel, string btnApprove)
        {
            if (btnApprove.ToUpper() == "REJECT")
            {
                cardModel.RequestStatus = "Rejected";
            }
            if (btnApprove.ToUpper() == "APPROVE")
            {
                cardModel.RequestStatus = "Approved";
            }
            //Get user info from userName
            WalletUserInfo walletUser = _walletUserBusiness.UserInfo(cardModel.UserName);

            cardModel.UserId     = walletUser.UserId;
            cardModel.AgentId    = walletUser.AgentId;
            cardModel.ActionUser = Session["UserId"].ToString();
            cardModel.CreatedIp  = ApplicationUtilities.GetIP();
            cardModel.CardType   = _card.GetCardType().FirstOrDefault(x => x.Value == cardModel.CardType).Key;
            CardCommon       cardCommon = cardModel.MapObject <CardCommon>();
            CommonDbResponse dbResponse = _card.CardApproval(cardCommon);

            dbResponse.SetMessageInTempData(this);
            return(RedirectToAction("CardApprovalList"));
        }