2023-05-17 03:35:13 +04:00
|
|
|
|
using BeautySalonContracts.BusinessLogicsContracts;
|
2023-05-13 19:29:18 +04:00
|
|
|
|
|
|
|
|
|
namespace BeautySalon
|
|
|
|
|
{
|
|
|
|
|
public partial class FormTests : Form
|
|
|
|
|
{
|
2023-05-17 03:35:13 +04:00
|
|
|
|
private readonly IMasterLogic _masterLogic;
|
|
|
|
|
public FormTests(IMasterLogic masterLogic)
|
2023-05-13 19:29:18 +04:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2023-05-17 03:35:13 +04:00
|
|
|
|
_masterLogic = masterLogic;
|
|
|
|
|
numericUpDownInsert.Minimum = 1;
|
|
|
|
|
numericUpDownInsert.Maximum = 1000000;
|
|
|
|
|
numericUpDownRead.Minimum = 1;
|
|
|
|
|
numericUpDownRead.Maximum = 1000000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ButtonInsertTest_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var result = _masterLogic.TestInsertList(Convert.ToInt32(numericUpDownInsert.Value));
|
|
|
|
|
|
|
|
|
|
textBoxInsertTime.Text = result;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ButtonReadTest_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var result = _masterLogic.TestReadList(Convert.ToInt32(numericUpDownRead.Value));
|
|
|
|
|
textBoxReadTime.Text = result;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
2023-05-13 19:29:18 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|