public ActionResult Messages()
 {
     if (LoginControl.ControlLogin() != null)
     {
         ViewBag.PageInfo = "MESAJLARIM";
         return(View());
     }
     else
     {
         return(View("NotFound"));
     }
 }
 public ActionResult Exchanges()
 {
     if (LoginControl.ControlLogin() != null)
     {
         ViewBag.PageInfo = "TAKASLARIM";
         return(View());
     }
     else
     {
         return(View("NotFound"));
     }
 }
 public ActionResult Profil()
 {
     if (LoginControl.ControlLogin() != null)
     {
         ViewBag.PageInfo = "PROFİLİM";
         return(View((HttpContext.Session["User"] as User)));
     }
     else
     {
         return(View("NotFound"));
     }
 }
        public ActionResult Login()
        {
            var sonuc = LoginControl.ControlLogin();

            if (LoginControl.ControlLogin() == null)
            {
                ViewBag.SystemMessage = TempData["SystemMessage"] as string;
                ViewBag.Title         = "ProjectX | Giriş";
                return(View(user));
            }
            else
            {
                return(RedirectToAction("Index", "Home"));
            }
        }
 public ActionResult MyProducts()
 {
     if (LoginControl.ControlLogin() != null)
     {
         ViewBag.PageInfo = "ÜRÜNLERİM";
         HttpResponseMessage    result   = WebApiRequestOperation.WebApiRequestOperationMethodForUser(SystemConstannts.WebApiDomainAddress, "api/UserProfile/GetMyProducts", (HttpContext.Session["User"] as Takas.Common.Entities.Concrete.User));
         GetUserProductResponse response = null;
         if (result.StatusCode == HttpStatusCode.OK)
         {
             string resultString = result.Content.ReadAsStringAsync().Result;
             if (!resultString.Contains("{\"Products\":null"))
             {
                 response = Newtonsoft.Json.JsonConvert.DeserializeObject <GetUserProductResponse>(resultString);
             }
         }
         return(View(response));
     }
     return(View("NotFound"));
 }
Esempio n. 6
0
        //GET: Home
        //IUserService _userService = new UserManager();
        //public async Task<ActionResult> Index()
        //{
        //    User user = new User()
        //    {
        //        Address = "Pendik",
        //        Name = "yavuz",
        //        Surname = "ünlü",
        //        Email = "*****@*****.**",
        //        Password = "******",
        //        isActive = true,
        //        isBlocked = false,
        //        PhoneNumber = "05538056875",
        //        AccountActiveDate = DateTime.Now,
        //        AccountCreateDate=DateTime.Now,
        //        Image="",
        //        ValidationKey="",
        //        WrongCount=0,
        //        RoleID=1
        //    };
        //    _userService.AddUser(user);
        //    ViewBag.title = "Anasayfa";
        //    return View();
        //}

        #endregion

        public ActionResult Index()
        {
            LoginControl.ControlLogin();
            ViewBag.title = "Anasayfa";
            return(View());
        }