Example #1
0
 public void DeletePieceOfClothing(PieceOfClothing c)
 {
     try
     {
         clothes cl = c.Toclothes();
         dbConnection.DeletePieceOfClothing(cl);
     }
     catch (Exception e)
     {
         eventAggregator.GetEvent <DatabaseConnectionErrorOccuredEvent>().Publish(e.ToString());
         return;
     }
 }
Example #2
0
 public void UpdatePieceOfClothing(PieceOfClothing c)
 {
     try
     {
         clothes      cl            = c.Toclothes();
         ImageService imageService  = new ImageService();
         string       generatedName = imageService.SaveImage(c.PicturePath, c.Id);
         if (generatedName != null)
         {
             cl.picture_path = generatedName;
         }
         dbConnection.UpdateClothes(cl);
     }
     catch (Exception e)
     {
         eventAggregator.GetEvent <DatabaseConnectionErrorOccuredEvent>().Publish(e.ToString());
     }
 }