This commit is contained in:
Kirill 2024-05-18 19:37:55 +04:00
parent e4465d07b9
commit edf8de5843
11 changed files with 235 additions and 171 deletions

View File

@ -83,13 +83,13 @@ namespace ClothShopBusinessLogic.BusinessLogics
/// Сохранение компонент в файл-Word
/// </summary>
/// <param name="model"></param>
public void SaveComponentsToWordFile(ReportBindingModel model)
public void SaveTextilesToWordFile(ReportBindingModel model)
{
_saveToWord.CreateDoc(new WordInfo
{
FileName = model.FileName,
Title = "Список компонентов",
Components = _componentStorage.GetFullList()
Title = "Список изделий",
Textiles = _textileStorage.GetFullList()
});
}
/// <summary>

View File

@ -39,23 +39,21 @@ namespace ClothShopBusinessLogic.OfficePackage
StyleInfo = ExcelStyleInfoType.Text
});
rowIndex++;
foreach (var product in pc.Components)
foreach (var textile in pc.Components)
{
InsertCellInWorksheet(new ExcelCellParameters
{
ColumnName = "B",
RowIndex = rowIndex,
Text = product.Item1,
StyleInfo =
ExcelStyleInfoType.TextWithBroder
Text = textile.Item1,
StyleInfo = ExcelStyleInfoType.TextWithBroder
});
InsertCellInWorksheet(new ExcelCellParameters
{
ColumnName = "C",
RowIndex = rowIndex,
Text = product.Item2.ToString(),
StyleInfo =
ExcelStyleInfoType.TextWithBroder
Text = textile.Item2.ToString(),
StyleInfo = ExcelStyleInfoType.TextWithBroder
});
rowIndex++;
}

View File

@ -14,6 +14,7 @@ namespace AbstractShopBusinessLogic.OfficePackage
public void CreateDoc(WordInfo info)
{
CreateWord(info);
CreateParagraph(new WordParagraph
{
Texts = new List<(string, WordTextProperties)> { (info.Title, new WordTextProperties { Bold = true, Size = "24", }) },
@ -23,12 +24,13 @@ namespace AbstractShopBusinessLogic.OfficePackage
JustificationType = WordJustificationType.Center
}
});
foreach (var component in info.Components)
foreach (var engine in info.Textiles)
{
CreateParagraph(new WordParagraph
{
Texts = new List<(string, WordTextProperties)> {
(component.ComponentName, new WordTextProperties { Size = "24", }) },
Texts = new List<(string, WordTextProperties)> {(engine.TextileName + " - ", new WordTextProperties { Size = "24", Bold = true}),
(engine.Price.ToString(), new WordTextProperties { Size = "24", })},
TextProperties = new WordTextProperties
{
Size = "24",
@ -36,23 +38,27 @@ namespace AbstractShopBusinessLogic.OfficePackage
}
});
}
SaveWord(info);
}
/// <summary>
/// Создание doc-файла
/// </summary>
/// <param name="info"></param>
/// Создание doc-файла
/// </summary>
/// <param name="info"></param>
protected abstract void CreateWord(WordInfo info);
/// <summary>
/// Создание абзаца с текстом
/// </summary>
/// <param name="paragraph"></param>
/// <returns></returns>
protected abstract void CreateParagraph(WordParagraph paragraph);
/// <summary>
/// Сохранение файла
/// </summary>
/// <param name="info"></param>
/// Сохранение файла
/// </summary>
/// <param name="info"></param>
protected abstract void SaveWord(WordInfo info);
}
}

View File

@ -11,6 +11,6 @@ namespace ClothShopBusinessLogic.OfficePackage.HelperModels
{
public string FileName { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public List<ComponentViewModel> Components { get; set; } = new();
public List<TextileViewModel> Textiles { get; set; } = new();
}
}

View File

@ -208,8 +208,7 @@ namespace ClothShopBusinessLogic.OfficePackage.Implements
{
ExcelStyleInfoType.Title => 2U,
ExcelStyleInfoType.TextWithBroder => 1U,
ExcelStyleInfoType.Text => 0U,
_ => 0U,
ExcelStyleInfoType.Text => 0U, _ => 0U,
};
}
protected override void CreateExcel(ExcelInfo info)

View File

@ -14,14 +14,15 @@ namespace AbstractShopBusinessLogic.OfficePackage.Implements
public class SaveToWord : AbstractSaveToWord
{
private WordprocessingDocument? _wordDocument;
private Body? _docBody;
/// <summary>
/// Получение типа выравнивания
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private static JustificationValues
GetJustificationValues(WordJustificationType type)
private static JustificationValues GetJustificationValues(WordJustificationType type)
{
return type switch
{
@ -30,6 +31,7 @@ namespace AbstractShopBusinessLogic.OfficePackage.Implements
_ => JustificationValues.Left,
};
}
/// <summary>
/// Настройки страницы
/// </summary>
@ -37,56 +39,61 @@ namespace AbstractShopBusinessLogic.OfficePackage.Implements
private static SectionProperties CreateSectionProperties()
{
var properties = new SectionProperties();
var pageSize = new PageSize
{
Orient = PageOrientationValues.Portrait
};
properties.AppendChild(pageSize);
return properties;
}
/// <summary>
/// Задание форматирования для абзаца
/// </summary>
/// <param name="paragraphProperties"></param>
/// <returns></returns>
private static ParagraphProperties?
CreateParagraphProperties(WordTextProperties? paragraphProperties)
private static ParagraphProperties? CreateParagraphProperties(WordTextProperties? paragraphProperties)
{
if (paragraphProperties == null)
{
return null;
}
var properties = new ParagraphProperties();
properties.AppendChild(new Justification()
{
Val =
GetJustificationValues(paragraphProperties.JustificationType)
Val = GetJustificationValues(paragraphProperties.JustificationType)
});
properties.AppendChild(new SpacingBetweenLines
{
LineRule = LineSpacingRuleValues.Auto
});
properties.AppendChild(new Indentation());
var paragraphMarkRunProperties = new ParagraphMarkRunProperties();
if (!string.IsNullOrEmpty(paragraphProperties.Size))
{
paragraphMarkRunProperties.AppendChild(new FontSize
{
Val =
paragraphProperties.Size
});
paragraphMarkRunProperties.AppendChild(new FontSize { Val = paragraphProperties.Size });
}
properties.AppendChild(paragraphMarkRunProperties);
return properties;
}
protected override void CreateWord(WordInfo info)
{
_wordDocument = WordprocessingDocument.Create(info.FileName,
WordprocessingDocumentType.Document);
_wordDocument = WordprocessingDocument.Create(info.FileName, WordprocessingDocumentType.Document);
MainDocumentPart mainPart = _wordDocument.AddMainDocumentPart();
mainPart.Document = new Document();
_docBody = mainPart.Document.AppendChild(new Body());
}
protected override void CreateParagraph(WordParagraph paragraph)
{
if (_docBody == null || paragraph == null)
@ -96,9 +103,11 @@ namespace AbstractShopBusinessLogic.OfficePackage.Implements
var docParagraph = new Paragraph();
docParagraph.AppendChild(CreateParagraphProperties(paragraph.TextProperties));
foreach (var run in paragraph.Texts)
{
var docRun = new Run();
var properties = new RunProperties();
properties.AppendChild(new FontSize { Val = run.Item2.Size });
if (run.Item2.Bold)
@ -106,16 +115,15 @@ namespace AbstractShopBusinessLogic.OfficePackage.Implements
properties.AppendChild(new Bold());
}
docRun.AppendChild(properties);
docRun.AppendChild(new Text
{
Text = run.Item1,
Space =
SpaceProcessingModeValues.Preserve
});
docRun.AppendChild(new Text { Text = run.Item1, Space = SpaceProcessingModeValues.Preserve });
docParagraph.AppendChild(docRun);
}
_docBody.AppendChild(docParagraph);
}
protected override void SaveWord(WordInfo info)
{
if (_docBody == null || _wordDocument == null)
@ -123,7 +131,9 @@ namespace AbstractShopBusinessLogic.OfficePackage.Implements
return;
}
_docBody.AppendChild(CreateSectionProperties());
_wordDocument.MainDocumentPart!.Document.Save();
_wordDocument.Dispose();
}
}

View File

@ -27,7 +27,7 @@ namespace ClothShopContracts.BusinessLogicContracts
/// Сохранение компонент в файл-Word
/// </summary>
/// <param name="model"></param>
void SaveComponentsToWordFile(ReportBindingModel model);
void SaveTextilesToWordFile(ReportBindingModel model);
/// <summary>
/// Сохранение компонент с указаеним продуктов в файл-Excel
/// </summary>

View File

@ -28,174 +28,165 @@
/// </summary>
private void InitializeComponent()
{
this.dataGridView = new System.Windows.Forms.DataGridView();
this.menuStrip = new System.Windows.Forms.MenuStrip();
this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.изделиеToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ReportComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ReportTextileComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ReportOrdeersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.buttonRefresh = new System.Windows.Forms.Button();
this.buttonIssuedOrder = new System.Windows.Forms.Button();
this.buttonOrderReady = new System.Windows.Forms.Button();
this.buttonTakeOrderInWork = new System.Windows.Forms.Button();
this.buttonCreateOrder = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.menuStrip.SuspendLayout();
this.SuspendLayout();
dataGridView = new DataGridView();
menuStrip = new MenuStrip();
справочникиToolStripMenuItem = new ToolStripMenuItem();
компонентыToolStripMenuItem = new ToolStripMenuItem();
изделиеToolStripMenuItem = new ToolStripMenuItem();
ReportToolStripMenuItem = new ToolStripMenuItem();
ReportTextilesToolStripMenuItem = new ToolStripMenuItem();
ReportTextileComponentsToolStripMenuItem = new ToolStripMenuItem();
ReportOrdeersToolStripMenuItem = new ToolStripMenuItem();
buttonRefresh = new Button();
buttonIssuedOrder = new Button();
buttonOrderReady = new Button();
buttonTakeOrderInWork = new Button();
buttonCreateOrder = new Button();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
menuStrip.SuspendLayout();
SuspendLayout();
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
this.dataGridView.BackgroundColor = System.Drawing.Color.White;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Location = new System.Drawing.Point(12, 31);
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersWidth = 51;
this.dataGridView.RowTemplate.Height = 29;
this.dataGridView.Size = new System.Drawing.Size(914, 377);
this.dataGridView.TabIndex = 8;
dataGridView.AllowUserToAddRows = false;
dataGridView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
dataGridView.BackgroundColor = Color.White;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(12, 31);
dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidth = 51;
dataGridView.Size = new Size(914, 377);
dataGridView.TabIndex = 8;
//
// menuStrip
//
this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.справочникиToolStripMenuItem,
this.ReportToolStripMenuItem});
this.menuStrip.Location = new System.Drawing.Point(0, 0);
this.menuStrip.Name = "menuStrip";
this.menuStrip.Size = new System.Drawing.Size(1156, 28);
this.menuStrip.TabIndex = 7;
this.menuStrip.Text = "Меню справочников";
menuStrip.ImageScalingSize = new Size(20, 20);
menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, ReportToolStripMenuItem });
menuStrip.Location = new Point(0, 0);
menuStrip.Name = "menuStrip";
menuStrip.Size = new Size(1156, 28);
menuStrip.TabIndex = 7;
menuStrip.Text = "Меню справочников";
//
// справочникиToolStripMenuItem
//
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.компонентыToolStripMenuItem,
this.изделиеToolStripMenuItem});
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24);
this.справочникиToolStripMenuItem.Text = "Справочники";
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, изделиеToolStripMenuItem });
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
справочникиToolStripMenuItem.Size = new Size(117, 24);
справочникиToolStripMenuItem.Text = "Справочники";
//
// компонентыToolStripMenuItem
//
this.компонентыToolStripMenuItem.Name = омпонентыToolStripMenuItem";
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
this.компонентыToolStripMenuItem.Text = "Компоненты";
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click);
компонентыToolStripMenuItem.Name = омпонентыToolStripMenuItem";
компонентыToolStripMenuItem.Size = new Size(182, 26);
компонентыToolStripMenuItem.Text = "Компоненты";
компонентыToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
//
// изделиеToolStripMenuItem
//
this.изделиеToolStripMenuItem.Name = "изделиеToolStripMenuItem";
this.изделиеToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
this.изделиеToolStripMenuItem.Text = "Изделие";
this.изделиеToolStripMenuItem.Click += new System.EventHandler(this.TextileToolStripMenuItem_Click);
изделиеToolStripMenuItem.Name = "изделиеToolStripMenuItem";
изделиеToolStripMenuItem.Size = new Size(182, 26);
изделиеToolStripMenuItem.Text = "Изделие";
изделиеToolStripMenuItem.Click += TextileToolStripMenuItem_Click;
//
// ReportToolStripMenuItem
//
this.ReportToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ReportComponentsToolStripMenuItem,
this.ReportTextileComponentsToolStripMenuItem,
this.ReportOrdeersToolStripMenuItem});
this.ReportToolStripMenuItem.Name = "ReportToolStripMenuItem";
this.ReportToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
this.ReportToolStripMenuItem.Text = "Отчеты";
ReportToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ReportTextilesToolStripMenuItem, ReportTextileComponentsToolStripMenuItem, ReportOrdeersToolStripMenuItem });
ReportToolStripMenuItem.Name = "ReportToolStripMenuItem";
ReportToolStripMenuItem.Size = new Size(73, 24);
ReportToolStripMenuItem.Text = "Отчеты";
//
// ReportComponentsToolStripMenuItem
// ReportTextilesToolStripMenuItem
//
this.ReportComponentsToolStripMenuItem.Name = "ReportComponentsToolStripMenuItem";
this.ReportComponentsToolStripMenuItem.Size = new System.Drawing.Size(276, 26);
this.ReportComponentsToolStripMenuItem.Text = "Список компонентов";
this.ReportComponentsToolStripMenuItem.Click += new System.EventHandler(this.ReportComponentsToolStripMenuItem_Click);
ReportTextilesToolStripMenuItem.Name = "ReportTextilesToolStripMenuItem";
ReportTextilesToolStripMenuItem.Size = new Size(276, 26);
ReportTextilesToolStripMenuItem.Text = "Список изделий";
ReportTextilesToolStripMenuItem.Click += ReportComponentsToolStripMenuItem_Click;
//
// ReportTextileComponentsToolStripMenuItem
//
this.ReportTextileComponentsToolStripMenuItem.Name = "ReportTextileComponentsToolStripMenuItem";
this.ReportTextileComponentsToolStripMenuItem.Size = new System.Drawing.Size(276, 26);
this.ReportTextileComponentsToolStripMenuItem.Text = "Компоненты по изделиям";
this.ReportTextileComponentsToolStripMenuItem.Click += new System.EventHandler(this.ReportTextileComponentsToolStripMenuItem_Click);
ReportTextileComponentsToolStripMenuItem.Name = "ReportTextileComponentsToolStripMenuItem";
ReportTextileComponentsToolStripMenuItem.Size = new Size(276, 26);
ReportTextileComponentsToolStripMenuItem.Text = "Компоненты по изделиям";
ReportTextileComponentsToolStripMenuItem.Click += ReportTextileComponentsToolStripMenuItem_Click;
//
// ReportOrdeersToolStripMenuItem
//
this.ReportOrdeersToolStripMenuItem.Name = "ReportOrdeersToolStripMenuItem";
this.ReportOrdeersToolStripMenuItem.Size = new System.Drawing.Size(276, 26);
this.ReportOrdeersToolStripMenuItem.Text = "Список заказов";
this.ReportOrdeersToolStripMenuItem.Click += new System.EventHandler(this.ReportOrdersToolStripMenuItem_Click);
ReportOrdeersToolStripMenuItem.Name = "ReportOrdeersToolStripMenuItem";
ReportOrdeersToolStripMenuItem.Size = new Size(276, 26);
ReportOrdeersToolStripMenuItem.Text = "Список заказов";
ReportOrdeersToolStripMenuItem.Click += ReportOrdersToolStripMenuItem_Click;
//
// buttonRefresh
//
this.buttonRefresh.Location = new System.Drawing.Point(932, 324);
this.buttonRefresh.Name = "buttonRefresh";
this.buttonRefresh.Size = new System.Drawing.Size(212, 38);
this.buttonRefresh.TabIndex = 13;
this.buttonRefresh.Text = "Обновить список";
this.buttonRefresh.UseVisualStyleBackColor = true;
this.buttonRefresh.Click += new System.EventHandler(this.ButtonRef_Click);
buttonRefresh.Location = new Point(932, 324);
buttonRefresh.Name = "buttonRefresh";
buttonRefresh.Size = new Size(212, 38);
buttonRefresh.TabIndex = 13;
buttonRefresh.Text = "Обновить список";
buttonRefresh.UseVisualStyleBackColor = true;
buttonRefresh.Click += ButtonRef_Click;
//
// buttonIssuedOrder
//
this.buttonIssuedOrder.Location = new System.Drawing.Point(932, 256);
this.buttonIssuedOrder.Name = "buttonIssuedOrder";
this.buttonIssuedOrder.Size = new System.Drawing.Size(212, 38);
this.buttonIssuedOrder.TabIndex = 12;
this.buttonIssuedOrder.Text = "Заказ выдан";
this.buttonIssuedOrder.UseVisualStyleBackColor = true;
this.buttonIssuedOrder.Click += new System.EventHandler(this.ButtonIssuedOrder_Click);
buttonIssuedOrder.Location = new Point(932, 256);
buttonIssuedOrder.Name = "buttonIssuedOrder";
buttonIssuedOrder.Size = new Size(212, 38);
buttonIssuedOrder.TabIndex = 12;
buttonIssuedOrder.Text = "Заказ выдан";
buttonIssuedOrder.UseVisualStyleBackColor = true;
buttonIssuedOrder.Click += ButtonIssuedOrder_Click;
//
// buttonOrderReady
//
this.buttonOrderReady.Location = new System.Drawing.Point(932, 190);
this.buttonOrderReady.Name = "buttonOrderReady";
this.buttonOrderReady.Size = new System.Drawing.Size(212, 38);
this.buttonOrderReady.TabIndex = 11;
this.buttonOrderReady.Text = "Заказ готов";
this.buttonOrderReady.UseVisualStyleBackColor = true;
this.buttonOrderReady.Click += new System.EventHandler(this.ButtonOrderReady_Click);
buttonOrderReady.Location = new Point(932, 190);
buttonOrderReady.Name = "buttonOrderReady";
buttonOrderReady.Size = new Size(212, 38);
buttonOrderReady.TabIndex = 11;
buttonOrderReady.Text = "Заказ готов";
buttonOrderReady.UseVisualStyleBackColor = true;
buttonOrderReady.Click += ButtonOrderReady_Click;
//
// buttonTakeOrderInWork
//
this.buttonTakeOrderInWork.Location = new System.Drawing.Point(932, 124);
this.buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
this.buttonTakeOrderInWork.Size = new System.Drawing.Size(212, 38);
this.buttonTakeOrderInWork.TabIndex = 10;
this.buttonTakeOrderInWork.Text = "Отдать на выполнение";
this.buttonTakeOrderInWork.UseVisualStyleBackColor = true;
this.buttonTakeOrderInWork.Click += new System.EventHandler(this.ButtonTakeOrderInWork_Click);
buttonTakeOrderInWork.Location = new Point(932, 124);
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
buttonTakeOrderInWork.Size = new Size(212, 38);
buttonTakeOrderInWork.TabIndex = 10;
buttonTakeOrderInWork.Text = "Отдать на выполнение";
buttonTakeOrderInWork.UseVisualStyleBackColor = true;
buttonTakeOrderInWork.Click += ButtonTakeOrderInWork_Click;
//
// buttonCreateOrder
//
this.buttonCreateOrder.Location = new System.Drawing.Point(932, 56);
this.buttonCreateOrder.Name = "buttonCreateOrder";
this.buttonCreateOrder.Size = new System.Drawing.Size(212, 38);
this.buttonCreateOrder.TabIndex = 9;
this.buttonCreateOrder.Text = "Создать заказ";
this.buttonCreateOrder.UseVisualStyleBackColor = true;
this.buttonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
buttonCreateOrder.Location = new Point(932, 56);
buttonCreateOrder.Name = "buttonCreateOrder";
buttonCreateOrder.Size = new Size(212, 38);
buttonCreateOrder.TabIndex = 9;
buttonCreateOrder.Text = "Создать заказ";
buttonCreateOrder.UseVisualStyleBackColor = true;
buttonCreateOrder.Click += ButtonCreateOrder_Click;
//
// FormMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1156, 417);
this.Controls.Add(this.dataGridView);
this.Controls.Add(this.menuStrip);
this.Controls.Add(this.buttonRefresh);
this.Controls.Add(this.buttonIssuedOrder);
this.Controls.Add(this.buttonOrderReady);
this.Controls.Add(this.buttonTakeOrderInWork);
this.Controls.Add(this.buttonCreateOrder);
this.Name = "FormMain";
this.Text = "Заказы";
this.Load += new System.EventHandler(this.FormMain_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1156, 417);
Controls.Add(dataGridView);
Controls.Add(menuStrip);
Controls.Add(buttonRefresh);
Controls.Add(buttonIssuedOrder);
Controls.Add(buttonOrderReady);
Controls.Add(buttonTakeOrderInWork);
Controls.Add(buttonCreateOrder);
Name = "FormMain";
Text = "Заказы";
Load += FormMain_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
menuStrip.ResumeLayout(false);
menuStrip.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
@ -211,7 +202,7 @@
private Button buttonTakeOrderInWork;
private Button buttonCreateOrder;
private ToolStripMenuItem ReportToolStripMenuItem;
private ToolStripMenuItem ReportComponentsToolStripMenuItem;
private ToolStripMenuItem ReportTextilesToolStripMenuItem;
private ToolStripMenuItem ReportTextileComponentsToolStripMenuItem;
private ToolStripMenuItem ReportOrdeersToolStripMenuItem;
}

View File

@ -174,7 +174,7 @@ namespace ClothShopView
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
if (dialog.ShowDialog() == DialogResult.OK)
{
_reportLogic.SaveComponentsToWordFile(new ReportBindingModel
_reportLogic.SaveTextilesToWordFile(new ReportBindingModel
{
FileName = dialog.FileName
});

View File

@ -1,4 +1,64 @@
<root>
<?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">

View File

@ -41,7 +41,7 @@
//
panel.Location = new Point(-1, 48);
panel.Name = "panel";
panel.Size = new Size(800, 401);
panel.Size = new Size(1121, 401);
panel.TabIndex = 0;
//
// label2
@ -100,7 +100,7 @@
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
ClientSize = new Size(1120, 450);
Controls.Add(label2);
Controls.Add(panel);
Controls.Add(label1);