コード例 #1
0
        public void deleteLibrarian(string id)
        {
            ThuThu e = db.ThuThus.SingleOrDefault(x => x.MaThuThu.Equals(id));

            db.ThuThus.Remove(e);
            db.SaveChanges();
        }
コード例 #2
0
        public void editLibrarian(ThuThu e)
        {
            ThuThu obj = db.ThuThus.SingleOrDefault(x => x.MaThuThu == e.MaThuThu);

            obj.HoTen       = e.HoTen;
            obj.NgaySinh    = e.NgaySinh;
            obj.DiaChi      = e.DiaChi;
            obj.SoDienThoai = e.SoDienThoai;
            obj.MatKhau     = e.MatKhau;
            obj.Email       = e.Email;
            obj.PhanCap     = e.PhanCap;
            db.SaveChanges();
        }
コード例 #3
0
 public void createLibrarian(ThuThu e)
 {
     db.ThuThus.Add(e);
     db.SaveChanges();
 }