public ActionResult Edit(Hakkımızda hakkımızda) { bool isUpdated = _hakkımızdaManager.Update(hakkımızda.Id, hakkımızda); if (isUpdated) { return(RedirectToAction("Index")); } return(View(hakkımızda)); }
public ActionResult Delete(Hakkımızda hakkımızda) { bool isDelete = _hakkımızdaManager.Delete(hakkımızda.Id); if (isDelete) { return(RedirectToAction("Index")); } ViewBag.Mgs = "Depo delete failed"; return(View(hakkımızda)); }
public ActionResult Create(Hakkımızda hakkımızda) { hakkımızda.Id = Guid.NewGuid().ToString(); bool isSaved = _hakkımızdaManager.Add(hakkımızda); string mgs = ""; if (isSaved) { return(RedirectToAction("Index")); } else { mgs = "Saved failed"; } if (!ModelState.IsValid) { return(View("Create")); } ViewBag.Mgs = mgs; return(View()); }