This commit is contained in:
ShabOl 2024-04-19 23:21:23 +04:00
parent 14aeac885b
commit 2a2d3d1845
5 changed files with 431 additions and 176 deletions

View File

@ -0,0 +1,68 @@
namespace AutoWorkshopView.Forms
{
partial class FormMail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
DataGridView = new DataGridView();
((System.ComponentModel.ISupportInitialize)DataGridView).BeginInit();
SuspendLayout();
//
// DataGridView
//
DataGridView.AllowUserToAddRows = false;
DataGridView.AllowUserToDeleteRows = false;
DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
DataGridView.Dock = DockStyle.Fill;
DataGridView.Location = new Point(0, 0);
DataGridView.Margin = new Padding(3, 2, 3, 2);
DataGridView.Name = "DataGridView";
DataGridView.ReadOnly = true;
DataGridView.RowHeadersWidth = 51;
DataGridView.RowTemplate.Height = 29;
DataGridView.Size = new Size(688, 202);
DataGridView.TabIndex = 0;
//
// FormMail
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(688, 202);
Controls.Add(DataGridView);
Margin = new Padding(3, 2, 3, 2);
Name = "FormMail";
Text = "Письма";
Load += FormMail_Load;
((System.ComponentModel.ISupportInitialize)DataGridView).EndInit();
ResumeLayout(false);
}
#endregion
private DataGridView DataGridView;
}
}

View File

@ -0,0 +1,47 @@
using AutoWorkshopContracts.BusinessLogicContracts;
using Microsoft.Extensions.Logging;
namespace AutoWorkshopView.Forms
{
public partial class FormMail : Form
{
private readonly ILogger _logger;
private readonly IMessageInfoLogic _messageLogic;
public FormMail(ILogger<FormMail> Logger, IMessageInfoLogic MessageLogic)
{
InitializeComponent();
_logger = Logger;
_messageLogic = MessageLogic;
}
private void LoadData()
{
try
{
var List = _messageLogic.ReadList(null);
if (List != null)
{
DataGridView.DataSource = List;
DataGridView.Columns["MessageId"].Visible = false;
DataGridView.Columns["ClientId"].Visible = false;
DataGridView.Columns["Body"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
_logger.LogInformation("Загрузка почтовых собщений");
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка загрузки почтовых сообщений");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void FormMail_Load(object sender, EventArgs e)
{
LoadData();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -20,182 +20,190 @@
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
MenuStrip = new MenuStrip();
ToolStripMenu = new ToolStripMenuItem();
ComponentsStripMenuItem = new ToolStripMenuItem();
RepairStripMenuItem = new ToolStripMenuItem();
ClientsToolStripMenuItem = new ToolStripMenuItem();
ImplementersToolStripMenuItem = new ToolStripMenuItem();
ReportsToolStripMenuItem = new ToolStripMenuItem();
ComponentsToolStripMenuItem1 = new ToolStripMenuItem();
ComponentRepairToolStripMenuItem1 = new ToolStripMenuItem();
OrdersToolStripMenuItem = new ToolStripMenuItem();
WorkStartToolStripMenuItem = new ToolStripMenuItem();
DataGridView = new DataGridView();
CreateOrderButton = new Button();
IssuedButton = new Button();
RefreshButton = new Button();
MenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)DataGridView).BeginInit();
SuspendLayout();
//
// MenuStrip
//
MenuStrip.ImageScalingSize = new Size(20, 20);
MenuStrip.Items.AddRange(new ToolStripItem[] { ToolStripMenu, ReportsToolStripMenuItem, WorkStartToolStripMenuItem });
MenuStrip.Location = new Point(0, 0);
MenuStrip.Name = "MenuStrip";
MenuStrip.Padding = new Padding(5, 2, 0, 2);
MenuStrip.Size = new Size(1356, 24);
MenuStrip.TabIndex = 0;
MenuStrip.Text = "TopMenuStrip";
//
// ToolStripMenu
//
ToolStripMenu.DropDownItems.AddRange(new ToolStripItem[] { ComponentsStripMenuItem, RepairStripMenuItem, ClientsToolStripMenuItem, ImplementersToolStripMenuItem });
ToolStripMenu.Name = "ToolStripMenu";
ToolStripMenu.Size = new Size(94, 20);
ToolStripMenu.Text = "Справочники";
//
// ComponentsStripMenuItem
//
ComponentsStripMenuItem.Name = "ComponentsStripMenuItem";
ComponentsStripMenuItem.Size = new Size(149, 22);
ComponentsStripMenuItem.Text = "Компоненты";
ComponentsStripMenuItem.Click += ComponentsStripMenuItem_Click;
//
// RepairStripMenuItem
//
RepairStripMenuItem.Name = "RepairStripMenuItem";
RepairStripMenuItem.Size = new Size(149, 22);
RepairStripMenuItem.Text = "Ремонты";
RepairStripMenuItem.Click += RepairsStripMenuItem_Click;
//
// ClientsToolStripMenuItem
//
ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem";
ClientsToolStripMenuItem.Size = new Size(149, 22);
ClientsToolStripMenuItem.Text = "Клиенты";
ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
//
// ImplementersToolStripMenuItem
//
ImplementersToolStripMenuItem.Name = "ImplementersToolStripMenuItem";
ImplementersToolStripMenuItem.Size = new Size(149, 22);
ImplementersToolStripMenuItem.Text = "Исполнители";
ImplementersToolStripMenuItem.Click += EmployersToolStripMenuItem_Click;
//
// ReportsToolStripMenuItem
//
ReportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem1, ComponentRepairToolStripMenuItem1, OrdersToolStripMenuItem });
ReportsToolStripMenuItem.Name = "ReportsToolStripMenuItem";
ReportsToolStripMenuItem.Size = new Size(60, 20);
ReportsToolStripMenuItem.Text = "Отчёты";
//
// ComponentsToolStripMenuItem1
//
ComponentsToolStripMenuItem1.Name = "ComponentsToolStripMenuItem1";
ComponentsToolStripMenuItem1.Size = new Size(210, 22);
ComponentsToolStripMenuItem1.Text = "Ремонты";
ComponentsToolStripMenuItem1.Click += ComponentsToolStripMenuItem_Click;
//
// ComponentRepairToolStripMenuItem1
//
ComponentRepairToolStripMenuItem1.Name = "ComponentRepairToolStripMenuItem1";
ComponentRepairToolStripMenuItem1.Size = new Size(210, 22);
ComponentRepairToolStripMenuItem1.Text = "Ремонт с компонентами";
ComponentRepairToolStripMenuItem1.Click += ComponentRepairToolStripMenuItem_Click;
//
// OrdersToolStripMenuItem
//
OrdersToolStripMenuItem.Name = "OrdersToolStripMenuItem";
OrdersToolStripMenuItem.Size = new Size(210, 22);
OrdersToolStripMenuItem.Text = "Заказы";
OrdersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
//
// WorkStartToolStripMenuItem
//
WorkStartToolStripMenuItem.Name = "WorkStartToolStripMenuItem";
WorkStartToolStripMenuItem.Size = new Size(92, 20);
WorkStartToolStripMenuItem.Text = "Запуск работ";
WorkStartToolStripMenuItem.Click += StartWorkToolStripMenuItem_Click;
//
// DataGridView
//
DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
DataGridView.Location = new Point(10, 23);
DataGridView.Margin = new Padding(3, 2, 3, 2);
DataGridView.Name = "DataGridView";
DataGridView.RowHeadersWidth = 51;
DataGridView.Size = new Size(1101, 358);
DataGridView.TabIndex = 1;
//
// CreateOrderButton
//
CreateOrderButton.Location = new Point(1117, 26);
CreateOrderButton.Margin = new Padding(3, 2, 3, 2);
CreateOrderButton.Name = "CreateOrderButton";
CreateOrderButton.Size = new Size(227, 30);
CreateOrderButton.TabIndex = 2;
CreateOrderButton.Text = "Создать заказ";
CreateOrderButton.UseVisualStyleBackColor = true;
CreateOrderButton.Click += CreateOrderButton_Click;
//
// IssuedButton
//
IssuedButton.Location = new Point(1117, 70);
IssuedButton.Margin = new Padding(3, 2, 3, 2);
IssuedButton.Name = "IssuedButton";
IssuedButton.Size = new Size(227, 30);
IssuedButton.TabIndex = 5;
IssuedButton.Text = "Заказ выдан";
IssuedButton.UseVisualStyleBackColor = true;
IssuedButton.Click += OrderDeliveredButton_Click;
//
// RefreshButton
//
RefreshButton.Location = new Point(1117, 114);
RefreshButton.Margin = new Padding(3, 2, 3, 2);
RefreshButton.Name = "RefreshButton";
RefreshButton.Size = new Size(227, 30);
RefreshButton.TabIndex = 6;
RefreshButton.Text = "Обновить";
RefreshButton.UseVisualStyleBackColor = true;
RefreshButton.Click += RefreshButton_Click;
//
// MainForm
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1356, 392);
Controls.Add(RefreshButton);
Controls.Add(IssuedButton);
Controls.Add(CreateOrderButton);
Controls.Add(DataGridView);
Controls.Add(MenuStrip);
MainMenuStrip = MenuStrip;
Margin = new Padding(3, 2, 3, 2);
Name = "MainForm";
Text = "Основная форма";
Load += MainForm_Load;
MenuStrip.ResumeLayout(false);
MenuStrip.PerformLayout();
((System.ComponentModel.ISupportInitialize)DataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
MenuStrip = new MenuStrip();
ToolStripMenu = new ToolStripMenuItem();
ComponentsStripMenuItem = new ToolStripMenuItem();
RepairStripMenuItem = new ToolStripMenuItem();
ClientsToolStripMenuItem = new ToolStripMenuItem();
ImplementersToolStripMenuItem = new ToolStripMenuItem();
ReportsToolStripMenuItem = new ToolStripMenuItem();
ComponentsToolStripMenuItem1 = new ToolStripMenuItem();
ComponentRepairToolStripMenuItem1 = new ToolStripMenuItem();
OrdersToolStripMenuItem = new ToolStripMenuItem();
WorkStartToolStripMenuItem = new ToolStripMenuItem();
MailToolStripMenuItem = new ToolStripMenuItem();
DataGridView = new DataGridView();
CreateOrderButton = new Button();
IssuedButton = new Button();
RefreshButton = new Button();
MenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)DataGridView).BeginInit();
SuspendLayout();
//
// MenuStrip
//
MenuStrip.ImageScalingSize = new Size(20, 20);
MenuStrip.Items.AddRange(new ToolStripItem[] { ToolStripMenu, ReportsToolStripMenuItem, WorkStartToolStripMenuItem, MailToolStripMenuItem });
MenuStrip.Location = new Point(0, 0);
MenuStrip.Name = "MenuStrip";
MenuStrip.Padding = new Padding(5, 2, 0, 2);
MenuStrip.Size = new Size(1356, 24);
MenuStrip.TabIndex = 0;
MenuStrip.Text = "TopMenuStrip";
//
// ToolStripMenu
//
ToolStripMenu.DropDownItems.AddRange(new ToolStripItem[] { ComponentsStripMenuItem, RepairStripMenuItem, ClientsToolStripMenuItem, ImplementersToolStripMenuItem });
ToolStripMenu.Name = "ToolStripMenu";
ToolStripMenu.Size = new Size(94, 20);
ToolStripMenu.Text = "Справочники";
//
// ComponentsStripMenuItem
//
ComponentsStripMenuItem.Name = "ComponentsStripMenuItem";
ComponentsStripMenuItem.Size = new Size(149, 22);
ComponentsStripMenuItem.Text = "Компоненты";
ComponentsStripMenuItem.Click += ComponentsStripMenuItem_Click;
//
// RepairStripMenuItem
//
RepairStripMenuItem.Name = "RepairStripMenuItem";
RepairStripMenuItem.Size = new Size(149, 22);
RepairStripMenuItem.Text = "Ремонты";
RepairStripMenuItem.Click += RepairsStripMenuItem_Click;
//
// ClientsToolStripMenuItem
//
ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem";
ClientsToolStripMenuItem.Size = new Size(149, 22);
ClientsToolStripMenuItem.Text = "Клиенты";
ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
//
// ImplementersToolStripMenuItem
//
ImplementersToolStripMenuItem.Name = "ImplementersToolStripMenuItem";
ImplementersToolStripMenuItem.Size = new Size(149, 22);
ImplementersToolStripMenuItem.Text = "Исполнители";
ImplementersToolStripMenuItem.Click += EmployersToolStripMenuItem_Click;
//
// ReportsToolStripMenuItem
//
ReportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem1, ComponentRepairToolStripMenuItem1, OrdersToolStripMenuItem });
ReportsToolStripMenuItem.Name = "ReportsToolStripMenuItem";
ReportsToolStripMenuItem.Size = new Size(60, 20);
ReportsToolStripMenuItem.Text = "Отчёты";
//
// ComponentsToolStripMenuItem1
//
ComponentsToolStripMenuItem1.Name = "ComponentsToolStripMenuItem1";
ComponentsToolStripMenuItem1.Size = new Size(210, 22);
ComponentsToolStripMenuItem1.Text = "Ремонты";
ComponentsToolStripMenuItem1.Click += ComponentsToolStripMenuItem_Click;
//
// ComponentRepairToolStripMenuItem1
//
ComponentRepairToolStripMenuItem1.Name = "ComponentRepairToolStripMenuItem1";
ComponentRepairToolStripMenuItem1.Size = new Size(210, 22);
ComponentRepairToolStripMenuItem1.Text = "Ремонт с компонентами";
ComponentRepairToolStripMenuItem1.Click += ComponentRepairToolStripMenuItem_Click;
//
// OrdersToolStripMenuItem
//
OrdersToolStripMenuItem.Name = "OrdersToolStripMenuItem";
OrdersToolStripMenuItem.Size = new Size(210, 22);
OrdersToolStripMenuItem.Text = "Заказы";
OrdersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
//
// WorkStartToolStripMenuItem
//
WorkStartToolStripMenuItem.Name = "WorkStartToolStripMenuItem";
WorkStartToolStripMenuItem.Size = new Size(92, 20);
WorkStartToolStripMenuItem.Text = "Запуск работ";
WorkStartToolStripMenuItem.Click += StartWorkToolStripMenuItem_Click;
//
// MailToolStripMenuItem
//
MailToolStripMenuItem.Name = "MailToolStripMenuItem";
MailToolStripMenuItem.Size = new Size(53, 20);
MailToolStripMenuItem.Text = "Почта";
MailToolStripMenuItem.Click += MailToolStripMenuItem_Click;
//
// DataGridView
//
DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
DataGridView.Location = new Point(10, 23);
DataGridView.Margin = new Padding(3, 2, 3, 2);
DataGridView.Name = "DataGridView";
DataGridView.RowHeadersWidth = 51;
DataGridView.Size = new Size(1101, 358);
DataGridView.TabIndex = 1;
//
// CreateOrderButton
//
CreateOrderButton.Location = new Point(1117, 26);
CreateOrderButton.Margin = new Padding(3, 2, 3, 2);
CreateOrderButton.Name = "CreateOrderButton";
CreateOrderButton.Size = new Size(227, 30);
CreateOrderButton.TabIndex = 2;
CreateOrderButton.Text = "Создать заказ";
CreateOrderButton.UseVisualStyleBackColor = true;
CreateOrderButton.Click += CreateOrderButton_Click;
//
// IssuedButton
//
IssuedButton.Location = new Point(1117, 70);
IssuedButton.Margin = new Padding(3, 2, 3, 2);
IssuedButton.Name = "IssuedButton";
IssuedButton.Size = new Size(227, 30);
IssuedButton.TabIndex = 5;
IssuedButton.Text = "Заказ выдан";
IssuedButton.UseVisualStyleBackColor = true;
IssuedButton.Click += OrderDeliveredButton_Click;
//
// RefreshButton
//
RefreshButton.Location = new Point(1117, 114);
RefreshButton.Margin = new Padding(3, 2, 3, 2);
RefreshButton.Name = "RefreshButton";
RefreshButton.Size = new Size(227, 30);
RefreshButton.TabIndex = 6;
RefreshButton.Text = "Обновить";
RefreshButton.UseVisualStyleBackColor = true;
RefreshButton.Click += RefreshButton_Click;
//
// MainForm
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1356, 392);
Controls.Add(RefreshButton);
Controls.Add(IssuedButton);
Controls.Add(CreateOrderButton);
Controls.Add(DataGridView);
Controls.Add(MenuStrip);
MainMenuStrip = MenuStrip;
Margin = new Padding(3, 2, 3, 2);
Name = "MainForm";
Text = "Основная форма";
Load += MainForm_Load;
MenuStrip.ResumeLayout(false);
MenuStrip.PerformLayout();
((System.ComponentModel.ISupportInitialize)DataGridView).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
#endregion
private MenuStrip MenuStrip;
private MenuStrip MenuStrip;
private ToolStripMenuItem ToolStripMenu;
private ToolStripMenuItem ComponentsStripMenuItem;
private ToolStripMenuItem RepairStripMenuItem;
@ -210,5 +218,6 @@
private ToolStripMenuItem ClientsToolStripMenuItem;
private ToolStripMenuItem ImplementersToolStripMenuItem;
private ToolStripMenuItem WorkStartToolStripMenuItem;
}
private ToolStripMenuItem MailToolStripMenuItem;
}
}

View File

@ -42,7 +42,8 @@ namespace AutoWorkshopView
DataGridView.DataSource = List;
DataGridView.Columns["RepairId"].Visible = false;
DataGridView.Columns["ClientId"].Visible = false;
DataGridView.Columns["ImplementerId"].Visible = false;
DataGridView.Columns["ClientEmail"].Visible = false;
DataGridView.Columns["ImplementerId"].Visible = false;
DataGridView.Columns["RepairName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
@ -232,5 +233,15 @@ namespace AutoWorkshopView
MessageBox.Show("Процесс обработки запущен", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void MailToolStripMenuItem_Click(object sender, EventArgs e)
{
var Service = Program.ServiceProvider?.GetService(typeof(FormMail));
if (Service is FormMail Form)
{
Form.ShowDialog();
}
}
}
}