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