forked from DavidMakarov/StudentEnrollment
60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
|
using Microsoft.Extensions.Logging;
|
|||
|
using StudentEnrollmentContracts.BusinessLogicContracts;
|
|||
|
|
|||
|
namespace StudentEnrollmentView
|
|||
|
{
|
|||
|
public partial class FormStudents : Form
|
|||
|
{
|
|||
|
private readonly ILogger _logger;
|
|||
|
private readonly IStudentLogic _logic;
|
|||
|
public FormStudents(ILogger<FormStudents> logger, IStudentLogic logic)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
_logger = logger;
|
|||
|
_logic = logic;
|
|||
|
}
|
|||
|
|
|||
|
private void FormStudents_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
LoadData();
|
|||
|
}
|
|||
|
private void LoadData()
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
var list = _logic.ReadList(null);
|
|||
|
if (list != null)
|
|||
|
{
|
|||
|
dataGridView.DataSource = list;
|
|||
|
dataGridView.Columns["Id"].Visible = false;
|
|||
|
dataGridView.Columns["ExamPoints"].Visible = false;
|
|||
|
}
|
|||
|
_logger.LogInformation("Загрузка компонентов");
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
_logger.LogError(ex, "Ошибка загрузки компонентов");
|
|||
|
}
|
|||
|
}
|
|||
|
private void buttonAdd_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
private void buttonUpd_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
private void buttonDel_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
private void buttonRef_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|