Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Bacsi bacsi = db.Bacsis.Find(id);

            db.Bacsis.Remove(bacsi);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 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));
 }
Beispiel #3
0
 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!");
     }
 }
Beispiel #4
0
        // 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));
        }
Beispiel #5
0
        // 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));
        }