Пример #1
0
 public void CreateCateProduct(CateProduct cateproduct)
 {
     using (SqlConnection connection = base.GetConnection())
     {
         SqlCommand command = new SqlCommand("_CateProductUpdate", connection) {
             CommandType = CommandType.StoredProcedure
         };
         command.Parameters.AddWithValue("@Type", 0);
         command.Parameters.AddWithValue("@CateProductID", 0);
         command.Parameters.AddWithValue("@ParentProductID", cateproduct.ParentProductID);
         command.Parameters.AddWithValue("@CateProductName", cateproduct.CateProductName);
         command.Parameters.AddWithValue("@CateProductTotal", cateproduct.CateProductTotal);
         command.Parameters.AddWithValue("@CateProductOrder", cateproduct.CateProductOrder);
         command.Parameters.AddWithValue("@Language", cateproduct.Language);
         command.Parameters.AddWithValue("@Icon", cateproduct.Icon);
         command.Parameters.AddWithValue("@Slogan", cateproduct.Slogan);
         connection.Open();
         if (command.ExecuteNonQuery() <= 0)
         {
             throw new DataAccessException("Kh\x00f4ng thể tạo danh mục tin");
         }
         command.Dispose();
     }
 }
Пример #2
0
 public void CreateCateNew(CateProduct cateProduct)
 {
     new CateProductDAO().CreateCateProduct(cateProduct);
 }
Пример #3
0
 public void UpdateCateProduct(CateProduct cateProduct)
 {
     new CateProductDAO().UpdateCateProduct(cateProduct);
 }