public bool xoahb(String tentk) { tlb_hocbong sv = timmahb(tentk); db.tlb_hocbongs.DeleteOnSubmit(sv); try { db.SubmitChanges(); } catch { return(false); } return(true); }
public bool suahocbong(String msv, String hientrang) { tlb_hocbong diem = timmahb(msv); diem.MaSV = msv; diem.hientrang = hientrang; try { db.SubmitChanges(); } catch { return(false); } return(true); }
public bool dkhocbong(String msv, String dkk, String hoancanh, String sdt) { tlb_hocbong hb = new tlb_hocbong(); hb.MaSV = msv; hb.dienkhokhan = dkk; hb.hoancanh = hoancanh; hb.SDT = sdt; db.tlb_hocbongs.InsertOnSubmit(hb); try { db.SubmitChanges(); } catch { return(false); } return(true); }
public tlb_hocbong timhc(String tentk) { tlb_hocbong tim = db.tlb_hocbongs.Where(s => s.MaSV == tentk).SingleOrDefault(); return(tim); }