Пример #1
0
 public ActionResult Edit(Assignment assignment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(assignment).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(assignment);
 }
Пример #2
0
        public ActionResult Create(Assignment assignment)
        {
            if (ModelState.IsValid)
            {
                db.Assignments.Add(assignment);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(assignment);
        }
Пример #3
0
Файл: Unit.cs Проект: rtw/SARMS
 public void RemoveAssignment(Assignment assignment)
 {
     Assignments.Remove(assignment);
 }
Пример #4
0
Файл: Unit.cs Проект: rtw/SARMS
 public void AddAssignment(Assignment assignment)
 {
     Assignments.Add(assignment);
 }