poka shlyapa
This commit is contained in:
parent
e4feedd6bf
commit
d6a4ef895e
@ -20,6 +20,7 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
public partial class FormShop : Form
|
||||
{
|
||||
private readonly List<ShopViewModel>? _listShops;
|
||||
/// <summary>
|
||||
/// Логгер
|
||||
/// </summary>
|
||||
@ -46,8 +47,8 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
InitializeComponent();
|
||||
_logger = logger;
|
||||
_listShops = new ();
|
||||
_logic = logic;
|
||||
_shopPackages = new Dictionary<int, (IPackageModel, int)>();
|
||||
}
|
||||
/// <summary>
|
||||
/// Загрузка списка изделий в магазине
|
||||
@ -67,7 +68,7 @@ namespace SoftwareInstallationView
|
||||
textBoxShop.Text = view.Name;
|
||||
textBoxAddress.Text = view.Address;
|
||||
openingDatePicker.Text = view.DateOpening.ToString();
|
||||
_shopPackages = view.Packages ?? new Dictionary<int, (IPackageModel, int)>();
|
||||
_shopPackages = view.ShopPackages ?? new Dictionary<int, (IPackageModel, int)>();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
@ -104,7 +105,7 @@ namespace SoftwareInstallationView
|
||||
Name = textBoxShop.Text,
|
||||
Address = textBoxAddress.Text,
|
||||
DateOpening = openingDatePicker.Value.Date,
|
||||
Packages = _shopPackages
|
||||
PackageMaxCount = (int)numericUpDown.Value
|
||||
};
|
||||
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
|
||||
if (!operationResult)
|
||||
|
@ -41,7 +41,7 @@ namespace SoftwareInstallationView
|
||||
dataGridView.DataSource = list;
|
||||
|
||||
dataGridView.Columns["Id"].Visible = false;
|
||||
dataGridView.Columns["Packages"].Visible = false;
|
||||
dataGridView.Columns["ShopPackages"].Visible = false;
|
||||
dataGridView.Columns["Name"].AutoSizeMode =
|
||||
DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user