Beispiel #1
0
 public ActionResult Create(BloodGroup bloodgroup)
 {
     if (ModelState.IsValid) {
         bloodgroupRepository.InsertOrUpdate(bloodgroup);
         bloodgroupRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(bloodgroup);
     }
 }
Beispiel #2
0
 public void InsertOrUpdate(BloodGroup bloodgroup)
 {
     if (bloodgroup.BloodGroupID == default(int)) {
         // New entity
         context.BloodGroup.Add(bloodgroup);
     } else {
         // Existing entity
         context.Entry(bloodgroup).State = EntityState.Modified;
     }
 }
Beispiel #3
0
 public ActionResult Create()
 {
     BloodGroup bloodgroup = new BloodGroup();
     return View(bloodgroup);
 }
Beispiel #4
0
 public ViewResult Search(BloodGroup searchBloodGroup)
 {
     if(searchBloodGroup!=null)
     {
                     }
                 return View("Index",bloodgroupRepository.All);
 }