Beispiel #1
0
        public void ThemChamCong(string MaNV, string NgayLam, string Ca)
        {
            CHAMCONG cc = new CHAMCONG();

            cc.MANHANVIEN = MaNV;
            cc.NGAYLAM    = DateTime.Parse(NgayLam);
            cc.CA         = Ca;
            cf.CHAMCONGs.Add(cc);
            cf.SaveChanges();
        }
Beispiel #2
0
        public void XoaChamCong(string MaNV, DateTime NgayLam, string Ca)
        {
            CHAMCONG cc = new CHAMCONG();

            cc.MANHANVIEN = MaNV;
            cc.NGAYLAM    = NgayLam;
            cc.CA         = Ca;
            cf.CHAMCONGs.Attach(cc);
            cf.CHAMCONGs.Remove(cc);
            cf.SaveChanges();
        }