public ActionResult Guncelle(int id) { DepartmanModel dmodel = new DepartmanModel(); dmodel.Departman = dm.Bul(id); return(View(dmodel)); }
public ActionResult Index() { DepartmanModel model = new DepartmanModel(); model.dlist = dm.DepartmanListele(); return(View(model)); }
public ActionResult Guncelle(DepartmanModel dmodel, int id) { Departman departman = dm.Bul(id); departman.DepartmanAd = dmodel.Departman.DepartmanAd; dm.Guncelle(departman); dm.Save(); return(RedirectToAction("Index")); }
public ActionResult Ekle(DepartmanModel dmodel) { Departman departman = new Departman(); departman.DepartmanAd = dmodel.Departman.DepartmanAd; dm.Ekle(departman); dm.Save(); return(RedirectToAction("Index")); }