2024-11-23 23:26:39 +03:00
|
|
|
|
using ProductionInCehOTP.Entities;
|
|
|
|
|
using ProductionInCehOTP.Forms;
|
2024-11-26 20:29:11 +03:00
|
|
|
|
using ProductionInCehOTP.Forms.ArrivalsMaterials_Forms;
|
2024-12-10 00:09:57 +03:00
|
|
|
|
using ProductionInCehOTP.Forms.FormToReports;
|
2024-11-23 23:26:39 +03:00
|
|
|
|
using ProductionInCehOTP.Forms.Material_Forms;
|
2024-11-26 20:29:11 +03:00
|
|
|
|
using ProductionInCehOTP.Forms.PlanWork_Forms;
|
2024-11-23 23:26:39 +03:00
|
|
|
|
using System;
|
2024-11-12 19:18:35 +03:00
|
|
|
|
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;
|
2024-11-23 23:26:39 +03:00
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
using Unity;
|
2024-11-12 19:18:35 +03:00
|
|
|
|
|
|
|
|
|
namespace ProductionInCehOTP
|
|
|
|
|
{
|
|
|
|
|
public partial class ProductionInIndustrial : Form
|
|
|
|
|
{
|
2024-11-23 23:26:39 +03:00
|
|
|
|
private readonly IUnityContainer _container;
|
|
|
|
|
public ProductionInIndustrial(IUnityContainer container)
|
2024-11-12 19:18:35 +03:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2024-11-23 23:26:39 +03:00
|
|
|
|
_container = container ??
|
|
|
|
|
throw new ArgumentNullException(nameof(container));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void WorkerToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-26 20:29:11 +03:00
|
|
|
|
_container.Resolve<FormWorkers>().ShowDialog();
|
2024-11-23 23:26:39 +03:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ArrivalToCaseToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-26 20:29:11 +03:00
|
|
|
|
_container.Resolve<FormArrivalsOfMaterials>().ShowDialog();
|
2024-11-23 23:26:39 +03:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ProductToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-26 20:29:11 +03:00
|
|
|
|
_container.Resolve<FormProducts>().ShowDialog();
|
2024-11-23 23:26:39 +03:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ArrivalMaterialsToProductToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-26 20:29:11 +03:00
|
|
|
|
_container.Resolve<FormMaterials>().ShowDialog();
|
2024-11-23 23:26:39 +03:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void PlanWorkToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-11-26 20:29:11 +03:00
|
|
|
|
_container.Resolve<FormPlansWork>().ShowDialog();
|
2024-11-23 23:26:39 +03:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
2024-11-12 19:18:35 +03:00
|
|
|
|
}
|
2024-12-10 00:09:57 +03:00
|
|
|
|
|
|
|
|
|
private void DirectoryReportToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
_container.Resolve<FormDirectoryReport>().ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void MooveMaterialToProductReportToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
_container.Resolve<FormInnerAndOuterOfMaterialsToProductReport>().ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message, "Ошибка при загрузке",
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-12 19:18:35 +03:00
|
|
|
|
}
|
|
|
|
|
}
|