public static bool UpdateQRProduct(ListProduct product)
 {
     using (var _context = new DBQuanLyMaQREntities())
     {
         _context.ListProduct.AddOrUpdate(product);
         _context.SaveChanges();
         return(true);
     }
 }
 public static bool DeleteProduct(ListProduct product)
 {
     using (var _context = new DBQuanLyMaQREntities())
     {
         var v = _context.ListProduct.Find(product.STT);
         _context.ListProduct.Remove(v);
         _context.SaveChanges();
         return(true);
     }
 }
 public static bool AddProduct(ListProduct product)
 {
     try
     {
         using (var _context = new DBQuanLyMaQREntities())
         {
             _context.ListProduct.Add(product);
             _context.SaveChanges();
             return(true);
         }
     }
     catch
     {
         return(false);
     }
 }