예제 #1
0
 public ActionResult Edit(Guid id, FormCollection collection)
 {
     try
     {
         // TODO: Add update logic here
         Models.LocationInLibraryModel locationInLibraryModel = new Models.LocationInLibraryModel();
         UpdateModel(locationInLibraryModel);
         locationInLibraryRepository.UpdateLocationInLibrary(locationInLibraryModel);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View("EditLocationInLibrary"));
     }
 }
예제 #2
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         Models.LocationInLibraryModel locationInLibraryModel = new Models.LocationInLibraryModel();
         UpdateModel(locationInLibraryModel);
         locationInLibraryRepository.InsertLocationInLibrary(locationInLibraryModel);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View("CreateLocationInLibrary"));
     }
 }
예제 #3
0
 // GET: LocationInLibrary/Delete/5
 public ActionResult Delete(Guid id)
 {
     Models.LocationInLibraryModel locationInLibraryModel = locationInLibraryRepository.GetLocationInLibraryByID(id);
     return(View("DeleteLocationInLibrary", locationInLibraryModel));
 }