2024-11-10 16:15:39 +04:00
|
|
|
|
using ProjectTourAgency.Forms;
|
|
|
|
|
using Unity;
|
|
|
|
|
|
|
|
|
|
namespace ProjectTourAgency;
|
|
|
|
|
|
|
|
|
|
public partial class FormTourAgency : Form
|
2024-11-08 19:24:45 +04:00
|
|
|
|
{
|
2024-11-10 16:15:39 +04:00
|
|
|
|
private readonly IUnityContainer _container;
|
|
|
|
|
public FormTourAgency(IUnityContainer container)
|
2024-11-08 19:24:45 +04:00
|
|
|
|
{
|
2024-11-10 16:15:39 +04:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
_container = container ??
|
|
|
|
|
throw new ArgumentNullException(nameof(container));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
_container.Resolve<FormClients>().ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-11-11 13:38:53 +04:00
|
|
|
|
private void RotesToolStripMenuItem_Click(object sender, EventArgs e)
|
2024-11-10 16:15:39 +04:00
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-11 13:38:53 +04:00
|
|
|
|
_container.Resolve<FormRoutes>().ShowDialog();
|
2024-11-10 16:15:39 +04:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-11 13:38:53 +04:00
|
|
|
|
private void EmployeesToolStripMenuItem_Click(object sender, EventArgs e)
|
2024-11-10 16:15:39 +04:00
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-11 13:38:53 +04:00
|
|
|
|
_container.Resolve<FormEmployees>().ShowDialog();
|
2024-11-10 16:15:39 +04:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-11 13:38:53 +04:00
|
|
|
|
private void <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ToolStripMenuItem_Click(object sender, EventArgs e)
|
2024-11-10 16:15:39 +04:00
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-11 13:38:53 +04:00
|
|
|
|
_container.Resolve<FormAddMoney>().ShowDialog();
|
2024-11-10 16:15:39 +04:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
2024-11-08 19:24:45 +04:00
|
|
|
|
{
|
2024-11-10 16:15:39 +04:00
|
|
|
|
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
2024-11-08 19:24:45 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|