예제 #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();
     }
 }
예제 #2
0
 public void CreatePicture(Picture picture)
 {
     new PictureDAO().CreatePicture(picture);
 }
예제 #3
0
 public void UpdatePicture(Picture picture)
 {
     new PictureDAO().UpdatePicture(picture);
 }