PIbd-22_Rogashova_E.A._SUBD/BookShopView/FormMain.cs

67 lines
1.8 KiB
C#
Raw Normal View History

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();
}
2023-05-06 22:24:09 +04:00
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();
}
}
}
}