public void Xoa(string MaCa)
 {
     try
     {
         CaLamViec ca = db.CaLamViec.Find(MaCa);
         if (ca != null)
         {
             db.CaLamViec.Remove(ca);
             db.SaveChanges();
         }
     }
     catch
     {
     }
 }
 public void Them(CaLamViec ca)
 {
     try
     {
         var c = new CaLamViec()
         {
             MaCa       = ca.MaCa,
             TenCa      = ca.TenCa,
             GioBatDau  = ca.GioBatDau,
             GioKetThuc = ca.GioKetThuc,
             MucLuong   = ca.MucLuong
         };
         db.CaLamViec.Add(c);
         db.SaveChanges();
     }
     catch
     {
     }
 }
        public void CapNhat(CaLamViec ca)
        {
            try
            {
                CaLamViec c = db.CaLamViec.Find(ca.MaCa);
                if (c != null)
                {
                    c.MaCa       = ca.MaCa;
                    c.TenCa      = ca.TenCa;
                    c.GioBatDau  = ca.GioBatDau;
                    c.GioKetThuc = ca.GioKetThuc;
                    c.MucLuong   = ca.MucLuong;

                    db.SaveChanges();
                }
                ;
            }
            catch
            {
            }
        }