Beispiel #1
0
 public ActionResult Edit(EditSparteViewModel editSparteViewModel)
 {
     if (ModelState.IsValid)
     {
         SparteService.EditSparte(SparteViewModelService.Map_EditSparteViewModel_Sparte(editSparteViewModel));
         return(RedirectToAction("Index"));
     }
     return(View(editSparteViewModel));
 }
Beispiel #2
0
        // GET: Spartes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            EditSparteViewModel editSparteViewModel =
                SparteViewModelService.Map_Sparte_EditSparteViewModel(SparteService.SearchSparteById(Convert.ToInt32(id)));

            if (editSparteViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(editSparteViewModel));
        }
Beispiel #3
0
 public Sparte Map_EditSparteViewModel_Sparte(EditSparteViewModel editSparteViewModel)
 {
     return(Mapper.Map <Sparte>(editSparteViewModel));
 }