public ActionResult DeleteConfirmed(short id) { LOAINV lOAINV = db.LOAINVs.Find(id); db.LOAINVs.Remove(lOAINV); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "LNV_ID,LNV_TEN,LNV_MOTA")] LOAINV lOAINV) { if (ModelState.IsValid) { db.Entry(lOAINV).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lOAINV)); }
public ActionResult Create([Bind(Include = "LNV_ID,LNV_TEN,LNV_MOTA")] LOAINV lOAINV) { if (ModelState.IsValid) { lOAINV.LNV_ID = Convert.ToInt16(db.autottang("LoaiNV", "LNV_ID", db.LOAINVs.Count())); db.LOAINVs.Add(lOAINV); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lOAINV)); }
// GET: LOAINVs/Delete/5 public ActionResult Delete(short?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LOAINV lOAINV = db.LOAINVs.Find(id); if (lOAINV == null) { return(HttpNotFound()); } return(View(lOAINV)); }
public NhanVien(string _loai) { if (_loai == "banhang") { loaiNV = LOAINV.banhang; } else if (_loai == "thukho") { loaiNV = LOAINV.thukho; } else if (_loai == "ketoan") { loaiNV = LOAINV.ketoan; } }