Exemple #1
0
        public VirmanOutDTO GetVirmanDTO(int customerId, int accountId)
        {
            VirmanOutDTO dto = new VirmanOutDTO();

            using (BaseContext context = ContextFactory.Create())
            {
                IUnitOfWork           uow = new BaseUnitOfWork(context);
                IRepository <Account> accountRepository = uow.GetRepository <Account>();

                dto.Account     = accountRepository.GetAll(x => x.Id == accountId && x.Status == 1).FirstOrDefault();
                dto.AccountList = accountRepository.GetAll(x => x.CustomerId == customerId && x.Status == 1 && x.Id != accountId).ToList();

                return(dto);
            }
        }
        public ActionResult Virman()
        {
            string accountId = Request.QueryString["Acc"];

            if (string.IsNullOrWhiteSpace(accountId))
            {
                ViewBag.EmptyAccount = 1;
                return(View());
            }
            else
            {
                int          accountIntId = Convert.ToInt32(accountId);
                var          customerId   = UserSession.Info.Id;
                VirmanOutDTO dto          = _accountService.GetVirmanDTO(customerId, accountIntId);
                return(View(dto));
            }
        }