// GET: XAPHUONGs/Create public ActionResult Create() { XAPHUONG obj = new XAPHUONG(); obj.XP_MA = CreateID.CreateID_ByteText(); return(View(obj)); }
public ActionResult DeleteConfirmed(string id) { XAPHUONG xAPHUONG = db.XAPHUONGs.Find(id); db.XAPHUONGs.Remove(xAPHUONG); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "XP_MA,XP_TEN")] XAPHUONG xAPHUONG) { if (ModelState.IsValid) { db.Entry(xAPHUONG).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(xAPHUONG)); }
public ActionResult Create([Bind(Include = "XP_MA,XP_TEN")] XAPHUONG xAPHUONG) { if (ModelState.IsValid) { db.XAPHUONGs.Add(xAPHUONG); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(xAPHUONG)); }
// GET: XAPHUONGs/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } XAPHUONG xAPHUONG = db.XAPHUONGs.Find(id); if (xAPHUONG == null) { return(HttpNotFound()); } return(View(xAPHUONG)); }