public ActionResult DeleteConfirmed(int id) { DataSetTbl dataSetTbl = db.DataSetTbls.Find(id); db.DataSetTbls.Remove(dataSetTbl); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DSId,DataSetShortName,DataSetName,DataSetNamePersian,DataSetNamePashto,DataSetFor")] DataSetTbl dataSetTbl) { if (ModelState.IsValid) { db.Entry(dataSetTbl).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dataSetTbl)); }
// GET: DataSets/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DataSetTbl dataSetTbl = db.DataSetTbls.Find(id); if (dataSetTbl == null) { return(HttpNotFound()); } return(View(dataSetTbl)); }
public ActionResult Create([Bind(Include = "DSId,DataSetShortName,DataSetName,DataSetNamePersian,DataSetNamePashto,DataSetFor")] DataSetTbl dataSetTbl) { string sss = ""; foreach (string s in Request.Form.Keys) { sss += s.ToString() + ":" + Request.Form[s] + " "; } if (ModelState.IsValid) { db.DataSetTbls.Add(dataSetTbl); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dataSetTbl)); }