Beispiel #1
0
 public static void DeleteDonthuocchitiet(string MADONTHUOCMAU, string MABACSI, string MATHUOC)
 {
     using (DB_HMS_Entities dk = new DB_HMS_Entities())
     {
         var query = (from c in dk.tbDONTHUOCMAUCHITIETs
                      where c.MADONTHUOCMAU == MADONTHUOCMAU && c.MABACSI == MABACSI && c.MATHUOC == MATHUOC
                      select c).First();
         dk.DeleteObject(query);
         dk.SaveChanges();
     }
 }
 public static void DeleteFunctionofGroup(string MaNhomNhanVien)
 {
     using (DB_HMS_Entities lst = new DB_HMS_Entities())
     {
         var query = from u in lst.tbTINHNANGNHOMNDs where u.MANHOMND == MaNhomNhanVien select u;
         foreach (var row in query)
         {
             lst.DeleteObject(row);
         }
         lst.SaveChanges();
     }
 }
        /// <summary>
        /// Hàm delete 1 quốc gia ở database
        /// </summary>
        /// <param name="maquocgia"></param>
        public static void DeleteBenhtheopk(string MABENH, string MAPHONGKHAM)
        {
            using (DB_HMS_Entities dk = new DB_HMS_Entities())
            {
                var query = (from c in dk.tbBENHPHONGKHAMs
                             where c.MABENH == MABENH && c.MAPHONGKHAM == MAPHONGKHAM
                             select c).First();

                dk.DeleteObject(query);
                dk.SaveChanges();
            }
        }