public ActionResult UpdateApplicationJournal([DataSourceRequest] DataSourceRequest request, LimsApplicationJournal model)
        {
            if (ModelState.IsValid)
            {
                EquipmentJournalRepository eRepository = new EquipmentJournalRepository(false);

                eRepository.Update(model);
                eRepository.Save();
            }
            return(Json(new[] { model }.ToDataSourceResult(request, ModelState)));
        }
 public ActionResult DestroyApplicationJournal([DataSourceRequest] DataSourceRequest request, LimsApplicationJournal model)
 {
     if (model != null)
     {
         EquipmentJournalRepository eRepository = new EquipmentJournalRepository(false);
         eRepository.Delete(model.Id);
         eRepository.Save();
     }
     return(Json(new[] { model }.ToDataSourceResult(request, ModelState)));
 }
 public ActionResult CreateApplicationJournal([DataSourceRequest] DataSourceRequest request, [Bind(Exclude = "Id")] LimsApplicationJournal model)
 {
     if (ModelState.IsValid)
     {
         EquipmentJournalRepository eRepository = new EquipmentJournalRepository(false);
         model.Id         = Guid.NewGuid();
         model.CreateDate = DateTime.Now;
         eRepository.Insert(model);
         eRepository.Save();
     }
     return(Json(new[] { model }.ToDataSourceResult(request, ModelState)));
 }