Exemple #1
0
 public void UpdateShopLot(ShopLot shopLot)
 {
     if (!MyDb.UpdateData(shopLot.Save(), shopLot.Name, "ShopLot"))
     {
         throw new ArgumentException("Goods is already exists");
     }
 }
Exemple #2
0
 public void AddShopLot(ShopLot lot)
 {
     if (GetShopLot(lot.Name) != null)
     {
         var temp = lot.Save();
         if (temp.Length > DataForWrappers.MaxSizeOfShopLot)
         {
             throw new ArgumentException("Image too large");
         }
         bool result = MyDb.AddData(temp, lot.Name, "ShopLot");
         if (!result)
         {
             throw new ArgumentException("Goods is already exists");
         }
     }
     else
     {
         throw new ArgumentNullException(lot.Name);
     }
 }