public ActionResult DeleteConfirmed(int id) { loadtype loadtype = db.loadtypes.Find(id); db.loadtypes.Remove(loadtype); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "loadtype_id,name")] loadtype loadtype) { if (ModelState.IsValid) { db.Entry(loadtype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(loadtype)); }
public ActionResult Create([Bind(Include = "loadtype_id,name")] loadtype loadtype) { if (ModelState.IsValid) { db.loadtypes.Add(loadtype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(loadtype)); }
// GET: loadtypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } loadtype loadtype = db.loadtypes.Find(id); if (loadtype == null) { return(HttpNotFound()); } return(View(loadtype)); }
public void templatemulti(string filename, string template, bool startuploadwhendone = false) { _loadtype = loadtype.templatemulti; _sourcefilename = filename; _CurrentTemplate = _path + "\\" + template; _startuploadwhendone = startuploadwhendone; CurrentPage = 1; }