LabWork02_Hard start

This commit is contained in:
parent c6e457cd72
commit 395e725e78
5 changed files with 41 additions and 0 deletions

View File

@ -41,5 +41,10 @@ namespace AircraftPlantContracts.BindingModels
get;
set;
} = new();
/// <summary>
/// Максимальное количество изделий
/// </summary>
public int MaxPlanes { get; set; }
}
}

View File

@ -58,5 +58,21 @@ namespace AircraftPlantContracts.BusinessLogicsContracts
/// <param name="count"></param>
/// <returns></returns>
bool AddPlaneInShop(ShopSearchModel model, IPlaneModel plane, int count);
/// <summary>
/// Добавление изделий в магазины
/// </summary>
/// <param name="plane"></param>
/// <param name="count"></param>
/// <returns></returns>
bool AddPlanes(IPlaneModel plane, int count);
/// <summary>
/// Продажа изделий
/// </summary>
/// <param name="plane"></param>
/// <param name="count"></param>
/// <returns></returns>
bool SellPlanes(IPlaneModel plane, int count);
}
}

View File

@ -1,6 +1,7 @@
using AircraftPlantContracts.BindingModels;
using AircraftPlantContracts.SearchModels;
using AircraftPlantContracts.ViewModels;
using AircraftPlantDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
@ -54,5 +55,13 @@ namespace AircraftPlantContracts.StoragesContracts
/// <param name="model"></param>
/// <returns></returns>
ShopViewModel? Delete(ShopBindingModel model);
/// <summary>
/// Продажа изделий
/// </summary>
/// <param name="plane"></param>
/// <param name="count"></param>
/// <returns></returns>
bool SellPlanes(IPlaneModel plane, int count);
}
}

View File

@ -45,5 +45,11 @@ namespace AircraftPlantContracts.ViewModels
get;
set;
} = new();
/// <summary>
/// Максимальное количество изделий
/// </summary>
[DisplayName("Максимальное количество изделий")]
public int MaxPlanes { get; set; }
}
}

View File

@ -30,5 +30,10 @@ namespace AircraftPlantDataModels.Models
/// Коллекция изделий в магазине
/// </summary>
Dictionary<int, (IPlaneModel, int)> ShopPlanes { get; }
/// <summary>
/// Максимальное количество изделий
/// </summary>
int MaxPlanes { get; }
}
}