тут должна открываться формочка клиентов
This commit is contained in:
parent
933e678e63
commit
3d44d32761
@ -2,87 +2,88 @@
|
||||
|
||||
namespace Forms
|
||||
{
|
||||
public partial class FormMain : Form
|
||||
{
|
||||
public partial class FormMain : Form
|
||||
{
|
||||
|
||||
public FormMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public FormMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void carModelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormCarModel));
|
||||
if (service is FormCarModel form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void carModelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormCarModel));
|
||||
if (service is FormCarModel form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void carToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormCar));
|
||||
if (service is FormCar form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void carToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormCar));
|
||||
if (service is FormCar form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void branchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormBranch));
|
||||
if (service is FormBranch form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void branchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormBranch));
|
||||
if (service is FormBranch form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void clientToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormBranch));
|
||||
if (service is FormBranch form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void clientToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormClient));
|
||||
if (service is FormClient form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void rentalToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormRental));
|
||||
if (service is FormRental form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void rentalToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormRental));
|
||||
if (service is FormRental form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(Abstractions));
|
||||
if (service is Abstractions bd)
|
||||
{
|
||||
var client = new Client(){
|
||||
Id = 0,
|
||||
Address = "awsedff",
|
||||
Email = "afdgaw",
|
||||
Name = "aedfrg",
|
||||
Phone = "asda",
|
||||
Surname = "dfgvsdfg",
|
||||
};
|
||||
private void buttonTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(Abstractions));
|
||||
if (service is Abstractions bd)
|
||||
{
|
||||
var client = new Client()
|
||||
{
|
||||
Id = 0,
|
||||
Address = "awsedff",
|
||||
Email = "afdgaw",
|
||||
Name = "aedfrg",
|
||||
Phone = "asda",
|
||||
Surname = "dfgvsdfg",
|
||||
};
|
||||
|
||||
DateTime startTime = DateTime.Now;
|
||||
bd.DeleteClient(10);
|
||||
bd.DeleteClient(11);
|
||||
bd.DeleteClient(12);
|
||||
bd.DeleteClient(13);
|
||||
bd.DeleteClient(14);
|
||||
DateTime endTime = DateTime.Now;
|
||||
DateTime startTime = DateTime.Now;
|
||||
bd.DeleteClient(10);
|
||||
bd.DeleteClient(11);
|
||||
bd.DeleteClient(12);
|
||||
bd.DeleteClient(13);
|
||||
bd.DeleteClient(14);
|
||||
DateTime endTime = DateTime.Now;
|
||||
|
||||
// Выводим время выполнения запроса в консоль
|
||||
textBoxTest.Text = $"Время выполнения запроса: {(endTime - startTime).TotalMilliseconds} миллисекунд";
|
||||
}
|
||||
}
|
||||
// Выводим время выполнения запроса в консоль
|
||||
textBoxTest.Text = $"Время выполнения запроса: {(endTime - startTime).TotalMilliseconds} миллисекунд";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
private Abstractions bd = new Implementation();
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
@ -108,5 +109,5 @@ namespace Forms
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user