Exemplo n.º 1
0
 public ActionResult Create(CustomerDTO customer)
 {
     try
     {
         // TODO: Add insert logic here
         mgr.AddCustomers(customer);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here
                string name      = Request.Form["Name"];
                string firstName = Request.Form["FirstName"];
                string email     = Request.Form["Email"];
                string address   = Request.Form["Address"];

                mgr.AddCustomers(1, name, firstName, email, address, null);
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }