Пример #1
0
 //
 // GET: /User/Create
 public ActionResult Create()
 {
     var model = new UserDetail
     {
         ProjectDetail = db1.ProjectDetails.ToList()
     };
     return View(model);
 }
Пример #2
0
        public ActionResult Create(UserDetail userdetail)
        {
            if (ModelState.IsValid)
            {
                db.UserDetails.Add(userdetail);
                db.SaveChanges();
                return RedirectToAction("SearchCust");
            }

            return View(userdetail);
        }
Пример #3
0
 public ActionResult Edit(UserDetail userdetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userdetail).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("SearchCust");
     }
     return View(userdetail);
 }