Exemplo n.º 1
0
        public ActionResult BankAccountPetition(byte id)
        {
            var userId           = User.Identity.GetUserId();
            var individual       = unitOfWork.Individuals.GetJustIndividual(userId);                           //8
            var activeBankAccReq = unitOfWork.BankAccountRequests.GetBankAccountRequestWithStatus(userId, id); //9

            if (activeBankAccReq == null)
            {
                var bankAccRequest = new BankAccRequest(individual, RequestType.BankAccActivation, id);
                unitOfWork.BankAccountRequests.AddBankAccountRequest(bankAccRequest);//10

                var hubModel = new { Name = individual.FullName, Type = bankAccRequest.Type.ToString() };
                SignalHub.GetAccRequest(hubModel);

                unitOfWork.Complete();
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View(activeBankAccReq));
            }
        }
Exemplo n.º 2
0
 public void AddBankAccountRequest(BankAccRequest bankAccRequest)
 {
     _context.BankAccRequests.Add(bankAccRequest);
 }