public ActionResult Edit([Bind(Include = "Id,FabrikaId,DepoId,Deger")] TransportMaliyet transportMaliyet) { if (ModelState.IsValid) { _transportMaliyetService.Update(transportMaliyet); return(RedirectToAction("Index")); } ViewBag.DepoId = new SelectList(_depoService.GetList(), "Id", "Adi", transportMaliyet.DepoId); ViewBag.FabrikaId = new SelectList(_fabrikaService.GetList(), "Id", "Adi", transportMaliyet.FabrikaId); return(View(transportMaliyet)); }
// GET: Optimization/TransportMaliyet/Edit/5 public ActionResult Edit(int id) { if (id < 0) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TransportMaliyet transportMaliyet = _transportMaliyetService.GetById(id); if (transportMaliyet == null) { return(HttpNotFound()); } ViewBag.DepoId = new SelectList(_depoService.GetList(), "Id", "Adi", transportMaliyet.DepoId); ViewBag.FabrikaId = new SelectList(_fabrikaService.GetList(), "Id", "Adi", transportMaliyet.FabrikaId); return(View(transportMaliyet)); }
public void Update(TransportMaliyet TransportMaliyet) { _transportMaliyetDal.Update(TransportMaliyet); }
public void Insert(TransportMaliyet TransportMaliyet) { _transportMaliyetDal.Insert(TransportMaliyet); }