public HocSinh gethSinh(String maHS) { HocSinh hocSinh = (from hs in db.HocSinhs where hs.MaHS == maHS select hs).Single(); return(hocSinh); }
// hiển thị toàn bộ danh sách học sinh public PhieuKhamSucKhoe dspksk(HocSinh hocSinh, DateTime ngayKham) { PhieuKhamSucKhoe phieuKhamSucKhoe = (from p in db.PhieuKhamSucKhoes where p.MaHS == hocSinh.MaHS && p.NgayKham == ngayKham select p).Single(); return(phieuKhamSucKhoe); }
// hien bamg danh gia cua hoc sinh public DanhGiaHocSinhTuan bangDG(HocSinh hocSinh) { DanhGiaHocSinhTuan danhGiaHocSinhTuan = (from b in db.DanhGiaHocSinhTuans where b.MaHS == hocSinh.MaHS select b).Single(); return(danhGiaHocSinhTuan); }
// hien bamg danh gia cua hoc sinh public DanhGiaHocSinhNam bangDG(HocSinh hocSinh) { DanhGiaHocSinhNam danhGiaHocSinhNam = (from b in db.DanhGiaHocSinhNams where b.HocSinh == hocSinh select b).Single(); return(danhGiaHocSinhNam); }
public void updatehSinh(HocSinh hocSinh) { HocSinh hSinh = (from hs in db.HocSinhs where hs.MaHS == hocSinh.MaHS select hs).Single(); if (hSinh != null) { hSinh.MaLop = hocSinh.MaLop; hSinh.NgaySinh = hocSinh.NgaySinh; hSinh.HoTen = hocSinh.HoTen; hSinh.GioiTinh = hocSinh.GioiTinh; hSinh.HoTenNT1 = hocSinh.HoTenNT1; hSinh.EmailNT1 = hocSinh.EmailNT1; hSinh.DTNT1 = hocSinh.DTNT1; hSinh.HoTenNT2 = hocSinh.HoTenNT2; hSinh.EmailNT2 = hocSinh.EmailNT2; hSinh.DTNT2 = hocSinh.DTNT2; hSinh.ĐiaChi = hocSinh.ĐiaChi; hSinh.Hinh = hocSinh.Hinh; db.SaveChanges(); } }
public void deletehSinh(HocSinh hocSinh) { db.HocSinhs.Remove(hocSinh); db.SaveChanges(); }
public void inserthSinh(HocSinh hocSinh) { db.HocSinhs.Add(hocSinh); db.SaveChanges(); }