Beispiel #1
0
        // GET: Home
        public ActionResult Index()
        {
            if (User.Identity.IsAuthenticated && Cookies.IsEditUser && Cookies.IsChangeRoom)
            {
                return(Redirect("OrderRoom/Index"));
            }
            else if (User.Identity.IsAuthenticated && !Cookies.IsEditUser && !Cookies.IsChangeRoom)
            {
                return(Redirect("OrderRoom/Index"));
            }
            string result = "Вы не авторизованы 123";

            if (User.Identity.IsAuthenticated)
            {
                result = "Ваш логин: " + User.Identity.Name;
            }
            else
            {
                return(Redirect("Account/Login"));
            }

            HomeTest homeTest = new HomeTest {
                Text = result
            };

            return(View("Index", homeTest));
        }
Beispiel #2
0
        public ActionResult Proba()
        {
            string result = "ПРивет";

            HomeTest homeTest = new HomeTest {
                Text = result
            };

            return(View(homeTest));
        }
Beispiel #3
0
        public ActionResult Index()
        {
            var test = new HomeTest {
                Header = "Test Me"
            };

            ViewBag.Title = "Home Page";
            ViewBag.Test  = test;

            return(View());
        }