мини изменения

This commit is contained in:
dasha 2023-04-07 01:56:19 +04:00
parent 07ebb8d635
commit db7f79ed81
4 changed files with 12 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/*using HardwareShopClientApp; using HardwareShopClientApp;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
@ -27,27 +27,3 @@ app.MapControllerRoute(
pattern: "{controller=Home}/{action=Index}/{id?}"); pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run(); app.Run();
*/
using HardwareShopBusinessLogic.BusinessLogics.Storekeeper;
using HardwareShopDatabaseImplement.Implements.Storekeeper;
ComponentStorage _componentStorage = new();
ReportStorekeeperLogic reportLogic = new(_componentStorage);
var reportRecords = reportLogic.GetComponents(new() { Id = 1 },
new() { DateFrom = DateTime.MinValue, DateTo = DateTime.Now });
Console.WriteLine("start");
Console.WriteLine(reportRecords.Count);
foreach (var reportRecord in reportRecords)
{
Console.WriteLine("components: " + reportRecord.ComponentName);
Console.WriteLine("> good/build: ");
for (int i = 0; i < reportRecord.GoodOrBuilds.Count; i++)
{
Console.WriteLine(i + 1 + ". " + reportRecord.GoodOrBuilds[i].Item1
+ ". Count - " + reportRecord.GoodOrBuilds[i].Item2);
}
Console.WriteLine("Èòîãî - " + reportRecord.TotalCount);
}

View File

@ -25,6 +25,9 @@
<th> <th>
Цена Цена
</th> </th>
<th>
Дата приобретения
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -49,6 +52,10 @@
<label class="form-label">Стоимость</label> <label class="form-label">Стоимость</label>
<input type="number" step="0.01" class="form-control" name="cost" min="0.01"> <input type="number" step="0.01" class="form-control" name="cost" min="0.01">
</div> </div>
<div class="col">
<label class="form-label">Дата приобретения</label>
<input type="date" class="form-control" name="date">
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>

View File

@ -16,6 +16,10 @@
<label class="form-label">Стоимость</label> <label class="form-label">Стоимость</label>
<input type="number" step="0.01" class="form-control" name="cost" min="0.01"> <input type="number" step="0.01" class="form-control" name="cost" min="0.01">
</div> </div>
<div class="col-sm-3">
<label class="form-label">Дата приобретения</label>
<input type="date" class="form-control" name="date">
</div>
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline"> <div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
<button type="submit" class="btn btn-primary mt-3 px-4">Сохранить</button> <button type="submit" class="btn btn-primary mt-3 px-4">Сохранить</button>
</div> </div>

View File

@ -23,9 +23,6 @@
<th> <th>
Цена Цена
</th> </th>
<th>
Комплектующие
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>