Example #1
0
 public ActionResult Create(EmploymentType employmenttype)
 {
     if (ModelState.IsValid) {
         employmenttypeRepository.InsertOrUpdate(employmenttype);
         employmenttypeRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View();
     }
 }
Example #2
0
 public void InsertOrUpdate(EmploymentType employmenttype)
 {
     if (employmenttype.EmploymentTypeID == default(int)) {
         // New entity
         context.EmploymentType.Add(employmenttype);
     } else {
         // Existing entity
         context.Entry(employmenttype).State = EntityState.Modified;
     }
 }
Example #3
0
 public ViewResult Search(EmploymentType searchEmploymentType)
 {
     if(searchEmploymentType!=null)
     {
                     }
                 return View("Index",employmenttypeRepository.All);
 }