public ActionResult DeleteConfirmed(int id) { Bacsi bacsi = db.Bacsis.Find(id); db.Bacsis.Remove(bacsi); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IDBacsi,HoTen,Email,DienThoai,TaiKhoan,MatKhau,IDKhoa,Role")] Bacsi bacsi) { if (ModelState.IsValid) { db.Entry(bacsi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IDKhoa = new SelectList(db.Khoas, "IDKhoa", "TenKhoa", bacsi.IDKhoa); return(View(bacsi)); }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { if (clsThongTinChung._Quyen == "1" || clsThongTinChung._Quyen == "2") { Bacsi bs = new Bacsi(); loadMainPl(bs); } else { MessageBox.Show("Bạn không có quyền truy cập vào mục này!"); } }
// GET: Admin/Bacsis/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Bacsi bacsi = db.Bacsis.Find(id); if (bacsi == null) { return(HttpNotFound()); } return(View(bacsi)); }
// GET: Admin/Bacsis/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Bacsi bacsi = db.Bacsis.Find(id); if (bacsi == null) { return(HttpNotFound()); } ViewBag.IDKhoa = new SelectList(db.Khoas, "IDKhoa", "TenKhoa", bacsi.IDKhoa); return(View(bacsi)); }