Ejemplo n.º 1
0
 public void CreatePicture(Picture picture)
 {
     using (SqlConnection connection = base.GetConnection())
     {
         SqlCommand command = new SqlCommand("_PictureUpdate", connection) {
             CommandType = CommandType.StoredProcedure
         };
         command.Parameters.AddWithValue("@Type", 0);
         command.Parameters.AddWithValue("@PictureID", 0);
         command.Parameters.AddWithValue("@ProductID", picture.ProductID);
         command.Parameters.AddWithValue("@PictureThumb", picture.PictureThumb);
         command.Parameters.AddWithValue("@PictureLarge", picture.PictureLarge);
         connection.Open();
         if (command.ExecuteNonQuery() <= 0)
         {
             throw new DataAccessException("Kh\x00f4ng thể th\x00eam h\x00ecnh ảnh");
         }
         command.Dispose();
     }
 }
Ejemplo n.º 2
0
 public void CreatePicture(Picture picture)
 {
     new PictureDAO().CreatePicture(picture);
 }
Ejemplo n.º 3
0
 public void UpdatePicture(Picture picture)
 {
     new PictureDAO().UpdatePicture(picture);
 }