Exemplo n.º 1
0
 public ActionResult ShowAccounts()
 {
     if (Session["UserID"] != null)
     {
         var userAccounts = _readRepo.CitesteConturi(Session["Username"].ToString());
         if (userAccounts != null)
         {
             List <ContModel> contModelList = new List <ContModel>();
             foreach (ContDTO cont in userAccounts)
             {
                 contModelList.Add(GenereazaContModelView(cont));
             }
             return(View("ShowAccounts", contModelList));
         }
         else
         {
             return(View());
         }
     }
     else
     {
         return(RedirectToAction("Index"));
     }
 }