public void CreateDirection(Direction Direction) { utOfWork.DirectionRepository.Add(Direction); }
public ActionResult EditDirection(Direction reg) { if (ModelState.IsValid) { try { dir.UpdateDirectionDetached(reg); dir.SaveDirection(); return RedirectToAction("GetDirection"); } catch (Exception ex) { LogThread.WriteLine(ex.Message); return RedirectToAction("Index", "Error"); } } else { return View(); } }
public ActionResult CreateDirection(Direction direction) { if (ModelState.IsValid) { try { if (etat) { BissInventaireEntities.Instance.Direction.Add(direction); BissInventaireEntities.Instance.SaveChanges(); return RedirectToAction("GetDirection"); } else { return RedirectToAction("Index", "Error"); } } catch (Exception ex) { LogThread.WriteLine(ex.Message); return RedirectToAction("Index", "Error"); } } else { return View(); } }
public void UpdateDirectionDetached(Direction e) { utOfWork.DirectionRepository.UpdateDirectionDetached(e); }
public ActionResult CreateDirection(Direction direction) { try { BissInventaireEntities.Instance.Direction.Add(direction); BissInventaireEntities.Instance.SaveChanges(); return RedirectToAction("GetDirection"); } catch (Exception ex) { LogThread.WriteLine(ex.Message); return RedirectToAction("Index", "Error"); } }