Rogashova_E.A._CourseWork_H.../HospitalView/FormMain.cs

50 lines
1.4 KiB
C#

using HospitalContracts.BusinessLogicsContracts;
using Microsoft.Extensions.Logging;
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 HospitalView
{
public partial class FormMain : Form
{
private readonly ILogger _logger;
private readonly IRecipesLogic _recipesLogic;
public FormMain(ILogger<FormMain> logger, IRecipesLogic recipesLogic)
{
InitializeComponent();
_logger = logger;
_recipesLogic = recipesLogic;
}
//private void FormMain_Load(object sender, EventArgs e)
//{
// LoadData();
//}
private void MedicinesToolStripMenuItem_Click(object sender, EventArgs e)
{
var service =
Program.ServiceProvider?.GetService(typeof(FormMedicines));
if (service is FormMedicines form)
{
form.ShowDialog();
}
}
private void ProceduresToolStripMenuItem_Click(object sender, EventArgs e)
{
var service = Program.ServiceProvider?.GetService(typeof(FormProcedures));
if (service is FormProcedures form)
{
form.ShowDialog();
}
}
}
}