예제 #1
0
        public ActionResult Create(SalesmanModel salesmanmodel)
        {
            if (ModelState.IsValid)
            {
                context.SalesmanModels.Add(salesmanmodel);
                context.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(salesmanmodel);
        }
예제 #2
0
 public ActionResult Edit(SalesmanModel salesmanmodel)
 {
     if (ModelState.IsValid)
     {
         context.Entry(salesmanmodel).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(salesmanmodel);
 }
 private bool getID(SalesmanModel model)
 {
     return (1 == 1);
 }