Ejemplo n.º 1
0
        public ActionResult Index()
        {
            if (Session["Login"] != null)
            {
                gelen = (AppUsers)Session["Login"];
                int gelenid = gelen.UserID;

                Session.Add("Login", userManagement.GetUser(gelenid));

                var companysorgu = companyManagement.getCompany(gelenid);
                if (gelen.Status.Value == 3)
                {
                    return(View());
                }
                else
                {
                    if (companysorgu != null)
                    {
                        if (companysorgu.IsActive.Value)
                        {
                            Session.Add("Company", companysorgu);
                            TempData["Hata"] = "";
                            Session.Add("hata", "");
                            return(View());
                        }
                        else
                        {
                            return(RedirectToAction("AccountInfo", "Admin"));
                        }
                    }
                    else
                    {
                        return(RedirectToAction("CompanyRegister", "Admin"));
                    }
                }
            }
            else
            {
                return(RedirectToAction("LoginUser", "Home", new { area = "" }));
            }
        }
 public ActionResult Photo()
 {
     if (Session["Login"] != null)
     {
         gelen = (AppUsers)Session["Login"];
         if (gelen.Status.Value == 2)
         {
             return(View(companyManagement.getCompany(gelen.UserID)));
         }
         else
         {
             return(View());
         }
     }
     else
     {
         return(RedirectToAction("Index", "Home", new { area = "" }));
     }
 }