public ActionResult Edit(CutDetailType cutDetailType) { if (ModelState.IsValid) { cutDetailType.IsDeleted = false; UnitOfWork.CutDetailTypeRepository.Update(cutDetailType); UnitOfWork.Save(); return(RedirectToAction("Index")); } return(View(cutDetailType)); }
// GET: CutDetailTypes/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CutDetailType cutDetailType = UnitOfWork.CutDetailTypeRepository.GetById(id.Value); if (cutDetailType == null) { return(HttpNotFound()); } return(View(cutDetailType)); }
public ActionResult Create(CutDetailType cutDetailType) { if (ModelState.IsValid) { cutDetailType.IsDeleted = false; cutDetailType.CreationDate = DateTime.Now; cutDetailType.Id = Guid.NewGuid(); UnitOfWork.CutDetailTypeRepository.Insert(cutDetailType); UnitOfWork.Save(); return(RedirectToAction("Index")); } return(View(cutDetailType)); }