Ejemplo n.º 1
0
        public bool xoadhk(String msv)
        {
            tlb_diemhk dhk = timtheomadiem(msv);

            db.tlb_diemhks.DeleteOnSubmit(dhk);
            try
            {
                db.SubmitChanges();
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
        public bool suaxeploai(String msv, String namhoc, String hk, string xeploai)
        {
            tlb_diemhk diem = timtheomssv(msv, hk);

            diem.Xeploai = xeploai;
            try
            {
                db.SubmitChanges();
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 3
0
        public bool suadiem(String msv, String namhoc, String hk, double dtb, float drl, string xeploai)
        {
            tlb_diemhk diem = timtheomssv(msv, hk);

            diem.DiemTB  = dtb;
            diem.DiemRL  = drl;
            diem.Xeploai = xeploai;
            try
            {
                db.SubmitChanges();
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 4
0
        public bool themdiem(String msv)
        {
            tlb_diemhk dhk = new tlb_diemhk();

            dhk.MSSV = msv;

            db.tlb_diemhks.InsertOnSubmit(dhk);
            try
            {
                db.SubmitChanges();
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 5
0
        public bool themdiemhk(String msv, String hk, String namhoc)
        {
            tlb_diemhk dhk = new tlb_diemhk();

            dhk.MSSV   = msv;
            dhk.HK     = hk;
            dhk.Namhoc = namhoc;

            db.tlb_diemhks.InsertOnSubmit(dhk);
            try
            {
                db.SubmitChanges();
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 6
0
        public tlb_diemhk timtrung(String ma, String hk, String nam)
        {
            tlb_diemhk timm = db.tlb_diemhks.Where(s => s.MSSV == ma && s.HK == hk && s.Namhoc == nam).SingleOrDefault();

            return(timm);
        }