49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
|
using PersonnelDepartmentContracts.BusinessLogicContracts;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace PersonnelDepartmentView
|
|||
|
{
|
|||
|
public partial class FormGeneration : Form
|
|||
|
{
|
|||
|
private readonly IDealLogic _dealLogic;
|
|||
|
public FormGeneration(IDealLogic dealLogic)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
_dealLogic = dealLogic;
|
|||
|
}
|
|||
|
|
|||
|
private void ButtonGetTest_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
textBoxGet.Text = _dealLogic.GetTest(Convert.ToInt32(numericGet.Value)) + "мс";
|
|||
|
}
|
|||
|
|
|||
|
private void ButtonDiffGetTest_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
textBoxDiffGet.Text = _dealLogic.DiffGetTest(Convert.ToInt32(numericDiffGet.Value)) + "мс";
|
|||
|
}
|
|||
|
|
|||
|
private void ButtonSetTest_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
textBoxSet.Text = _dealLogic.SetTest(Convert.ToInt32(numericSet.Value)) + "мс";
|
|||
|
}
|
|||
|
|
|||
|
private void ButtonClear_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (_dealLogic.ClearList())
|
|||
|
{
|
|||
|
MessageBox.Show("Удаление записей завершено", "Успешно", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|||
|
return;
|
|||
|
}
|
|||
|
MessageBox.Show("Удаление записей провалилось", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|