67 lines
1.8 KiB
C#
67 lines
1.8 KiB
C#
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 BookShopView
|
||
{
|
||
public partial class FormMain : Form
|
||
{
|
||
public FormMain()
|
||
{
|
||
InitializeComponent();
|
||
}
|
||
|
||
private void AuthorsToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
var service = Program.ServiceProvider?.GetService(typeof(FormAuthors));
|
||
if (service is FormAuthors form)
|
||
{
|
||
form.ShowDialog();
|
||
}
|
||
}
|
||
private void GenresToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
var service = Program.ServiceProvider?.GetService(typeof(FormGenres));
|
||
|
||
if (service is FormGenres form)
|
||
{
|
||
form.ShowDialog();
|
||
}
|
||
}
|
||
private void BooksToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
var service = Program.ServiceProvider?.GetService(typeof(FormBooks));
|
||
|
||
if (service is FormBooks form)
|
||
{
|
||
form.ShowDialog();
|
||
}
|
||
}
|
||
private void ClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
var service = Program.ServiceProvider?.GetService(typeof(FormClients));
|
||
|
||
if (service is FormClients form)
|
||
{
|
||
form.ShowDialog();
|
||
}
|
||
}
|
||
|
||
private void buttonCreateOrder_Click(object sender, EventArgs e)
|
||
{
|
||
var service = Program.ServiceProvider?.GetService(typeof(FormСreateOrder));
|
||
if (service is FormСreateOrder form)
|
||
{
|
||
form.ShowDialog();
|
||
//LoadData();
|
||
}
|
||
}
|
||
}
|
||
}
|