Eliseev E.E. LabWork08_Hard #18
@ -1,4 +1,5 @@
|
||||
using BlacksmithWorkshopContracts.BindingModels;
|
||||
using BlacksmithWorkshopBusinessLogic.BusinessLogic;
|
||||
using BlacksmithWorkshopContracts.BindingModels;
|
||||
using BlacksmithWorkshopContracts.BusinessLogicsContracts;
|
||||
using BlacksmithWorkshopContracts.DI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@ -35,19 +36,11 @@ namespace BlacksmithWorkshop
|
||||
|
||||
private void LoadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = _logic.ReadList(null);
|
||||
try
|
||||
{
|
||||
dataGridView.FillandConfigGrid(_logic.ReadList(null));
|
||||
|
||||
//растягиваем колонку Название на всю ширину, колонку Id скрываем
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["Id"].Visible = false;
|
||||
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
|
||||
_logger.LogInformation("Загрузка исполнителей");
|
||||
_logger.LogInformation("Загрузка исполнителей");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -38,17 +38,9 @@ namespace BlacksmithWorkshop
|
||||
|
||||
try
|
||||
{
|
||||
var list = _messageLogic.ReadList(null);
|
||||
dataGridView.FillandConfigGrid(_messageLogic.ReadList(null));
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["MessageId"].Visible = false;
|
||||
dataGridView.Columns["ClientId"].Visible = false;
|
||||
dataGridView.Columns["Body"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
|
||||
_logger.LogInformation("Успешная загрузка писем");
|
||||
_logger.LogInformation("Успешная загрузка писем");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -50,18 +50,7 @@ namespace BlacksmithWorkshop
|
||||
|
||||
try
|
||||
{
|
||||
var list = _orderLogic.ReadList(null);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["ManufactureId"].Visible = false;
|
||||
dataGridView.Columns["ImplementerId"].Visible = false;
|
||||
dataGridView.Columns["ClientId"].Visible = false;
|
||||
dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
dataGridView.FillandConfigGrid(_orderLogic.ReadList(null));
|
||||
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using BlacksmithWorkshopContracts.BindingModels;
|
||||
using BlacksmithWorkshopBusinessLogic.BusinessLogic;
|
||||
using BlacksmithWorkshopContracts.BindingModels;
|
||||
using BlacksmithWorkshopContracts.BusinessLogicsContracts;
|
||||
using BlacksmithWorkshopContracts.DI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@ -38,15 +39,7 @@ namespace BlacksmithWorkshop
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = _logic.ReadList(null);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["Id"].Visible = false;
|
||||
dataGridView.Columns["ManufactureWorkPieces"].Visible = false;
|
||||
dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
dataGridView.FillandConfigGrid(_logic.ReadList(null));
|
||||
|
||||
_logger.LogInformation("Загрузка изделий");
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using BlacksmithWorkshopContracts.BindingModels;
|
||||
using BlacksmithWorkshopBusinessLogic.BusinessLogic;
|
||||
using BlacksmithWorkshopContracts.BindingModels;
|
||||
using BlacksmithWorkshopContracts.BusinessLogicsContracts;
|
||||
using BlacksmithWorkshopContracts.DI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@ -36,15 +37,7 @@ namespace BlacksmithWorkshop
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = _logic.ReadList(null);
|
||||
|
||||
//растягиваем колонку Название на всю ширину, колонку Id скрываем
|
||||
if(list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["Id"].Visible = false;
|
||||
dataGridView.Columns["WorkPieceName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
dataGridView.FillandConfigGrid(_logic.ReadList(null));
|
||||
|
||||
_logger.LogInformation("Загрузка заготовок");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user