Exemple #1
0
        public ActionResult Profil()
        {
            if (Session[LOGGET_INN] != null)
            {
                if (TempData["Error"] != null)
                {
                    ViewBag.Error = TempData["Error"].ToString();
                    TempData.Remove("Error");
                }
                if (TempData["Melding"] != null)
                {
                    ViewBag.Melding = TempData["Melding"].ToString();
                    TempData.Remove("Melding");
                }
                var kundeBLL    = new KundeBLL();
                var kID         = (int)Session[KID];
                var funnetKunde = kundeBLL.FinnKundeID(kID);

                if (funnetKunde != null)
                {
                    return(View(Mapper.Map <KundeEndreViewModel>(funnetKunde)));
                }
            }

            return(RedirectToAction("Login", "Kunde", new { area = "" }));
        }