public ActionResult Delete(int?id, int?bilanz) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Buchungssatz buchungssatz = unitOfWork.BuchungssatzRepository.Get((int)id); if (buchungssatz == null) { return(HttpNotFound()); } ViewBag.Bilanz = bilanz; return(View(buchungssatz)); }
public ActionResult Edit([Bind(Include = "Id,SollId,HabenId,Betrag,Beschreibung,BilanzId")] Buchungssatz buchungssatz, int?bilanz) { if (ModelState.IsValid) { unitOfWork.BuchungssatzRepository.Update(buchungssatz); unitOfWork.Complete(); if (bilanz != null) { return(RedirectToAction("Index", new { bilanz })); } return(RedirectToAction("Index")); } ViewBag.BilanzId = new SelectList(ctx.Bilanz, "Id", "Bezeichnung"); ViewBag.HabenId = new SelectList(ctx.Konto, "Id", "Bezeichnung"); ViewBag.SollId = new SelectList(ctx.Konto, "Id", "Bezeichnung"); return(View(buchungssatz)); }
public ActionResult Edit(int?id, int?bilanz) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Buchungssatz buchungssatz = unitOfWork.BuchungssatzRepository.Get((int)id); if (buchungssatz == null) { return(HttpNotFound()); } ViewBag.BilanzId = new SelectList(ctx.Bilanz, "Id", "Bezeichnung", bilanz); ViewBag.HabenId = new SelectList(ctx.Konto, "Id", "Bezeichnung"); ViewBag.SollId = new SelectList(ctx.Konto, "Id", "Bezeichnung"); ViewBag.Bilanz = bilanz; return(View(buchungssatz)); }