Example #1
0
 public ActionResult Contact(ContactModel model)
 {
     if (ModelState.IsValid)
     {
         Alert.SetAlert(AlertStatus.Succes, "Dziękujemy za wiadomość! Postaramy się odpowiedzieć w jak najszybszym tempie!");
         return RedirectToAction("Index");
     }
     else
     {
         return Contact();
     }
 }
Example #2
0
        public ActionResult Contact()
        {
            var model = new ContactModel();

            if (Session["Client"] != null)
            {
                model.Email = (Session["Client"] as AccountModel).Login;
                model.Id_Client = (Session["Client"] as AccountModel).Id;
            }

            ViewBag.Shops = new EFDbContext().DictShops;

            return View(model);
        }