ПИбд-23 Салин Олег Алексеевич Лабораторная работа №4 #12
@ -28,7 +28,18 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
67
IceCreamShop/IceCreamShop/MainForm.Designer.cs
generated
67
IceCreamShop/IceCreamShop/MainForm.Designer.cs
generated
@ -33,7 +33,7 @@
|
||||
КомпонентыStripMenuItem = new ToolStripMenuItem();
|
||||
МороженноеStripMenuItem = new ToolStripMenuItem();
|
||||
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
||||
списокКомпонентовToolStripMenuItem = new ToolStripMenuItem();
|
||||
списокМороженногоToolStripMenuItem = new ToolStripMenuItem();
|
||||
компонентыПоМороженнымToolStripMenuItem = new ToolStripMenuItem();
|
||||
списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
|
||||
DataGridView = new DataGridView();
|
||||
@ -52,8 +52,8 @@
|
||||
menuStrip1.Items.AddRange(new ToolStripItem[] { ToolStripMenu, отчетыToolStripMenuItem });
|
||||
menuStrip1.Location = new Point(0, 0);
|
||||
menuStrip1.Name = "menuStrip1";
|
||||
menuStrip1.Padding = new Padding(5, 2, 0, 2);
|
||||
menuStrip1.Size = new Size(1134, 24);
|
||||
menuStrip1.Padding = new Padding(6, 3, 0, 3);
|
||||
menuStrip1.Size = new Size(1296, 30);
|
||||
menuStrip1.TabIndex = 0;
|
||||
menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
@ -61,67 +61,65 @@
|
||||
//
|
||||
ToolStripMenu.DropDownItems.AddRange(new ToolStripItem[] { КомпонентыStripMenuItem, МороженноеStripMenuItem });
|
||||
ToolStripMenu.Name = "ToolStripMenu";
|
||||
ToolStripMenu.Size = new Size(94, 20);
|
||||
ToolStripMenu.Size = new Size(117, 24);
|
||||
ToolStripMenu.Text = "Справочники";
|
||||
//
|
||||
// КомпонентыStripMenuItem
|
||||
//
|
||||
КомпонентыStripMenuItem.Name = "КомпонентыStripMenuItem";
|
||||
КомпонентыStripMenuItem.Size = new Size(148, 22);
|
||||
КомпонентыStripMenuItem.Size = new Size(186, 26);
|
||||
КомпонентыStripMenuItem.Text = "Компоненты";
|
||||
КомпонентыStripMenuItem.Click += КомпонентыStripMenuItem_Click;
|
||||
//
|
||||
// МороженноеStripMenuItem
|
||||
//
|
||||
МороженноеStripMenuItem.Name = "МороженноеStripMenuItem";
|
||||
МороженноеStripMenuItem.Size = new Size(148, 22);
|
||||
МороженноеStripMenuItem.Size = new Size(186, 26);
|
||||
МороженноеStripMenuItem.Text = "Мороженное";
|
||||
МороженноеStripMenuItem.Click += МороженноеStripMenuItem_Click;
|
||||
//
|
||||
// отчетыToolStripMenuItem
|
||||
//
|
||||
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокКомпонентовToolStripMenuItem, компонентыПоМороженнымToolStripMenuItem, списокЗаказовToolStripMenuItem });
|
||||
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокМороженногоToolStripMenuItem, компонентыПоМороженнымToolStripMenuItem, списокЗаказовToolStripMenuItem });
|
||||
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||
отчетыToolStripMenuItem.Size = new Size(60, 20);
|
||||
отчетыToolStripMenuItem.Size = new Size(73, 24);
|
||||
отчетыToolStripMenuItem.Text = "Отчеты";
|
||||
//
|
||||
// списокКомпонентовToolStripMenuItem
|
||||
// списокМороженногоToolStripMenuItem
|
||||
//
|
||||
списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
|
||||
списокКомпонентовToolStripMenuItem.Size = new Size(242, 22);
|
||||
списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
|
||||
списокКомпонентовToolStripMenuItem.Click += списокКомпонентовToolStripMenuItem_Click;
|
||||
списокМороженногоToolStripMenuItem.Name = "списокМороженногоToolStripMenuItem";
|
||||
списокМороженногоToolStripMenuItem.Size = new Size(305, 26);
|
||||
списокМороженногоToolStripMenuItem.Text = "Список мороженного";
|
||||
списокМороженногоToolStripMenuItem.Click += списокМороженногоToolStripMenuItem_Click;
|
||||
//
|
||||
// компонентыПоМороженнымToolStripMenuItem
|
||||
//
|
||||
компонентыПоМороженнымToolStripMenuItem.Name = "компонентыПоМороженнымToolStripMenuItem";
|
||||
компонентыПоМороженнымToolStripMenuItem.Size = new Size(242, 22);
|
||||
компонентыПоМороженнымToolStripMenuItem.Size = new Size(305, 26);
|
||||
компонентыПоМороженнымToolStripMenuItem.Text = "Компоненты по мороженным";
|
||||
компонентыПоМороженнымToolStripMenuItem.Click += компонентыПоМороженнымToolStripMenuItem_Click;
|
||||
//
|
||||
// списокЗаказовToolStripMenuItem
|
||||
//
|
||||
списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
|
||||
списокЗаказовToolStripMenuItem.Size = new Size(242, 22);
|
||||
списокЗаказовToolStripMenuItem.Size = new Size(305, 26);
|
||||
списокЗаказовToolStripMenuItem.Text = "Список заказов";
|
||||
списокЗаказовToolStripMenuItem.Click += списокЗаказовToolStripMenuItem_Click;
|
||||
//
|
||||
// DataGridView
|
||||
//
|
||||
DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
DataGridView.Location = new Point(10, 23);
|
||||
DataGridView.Margin = new Padding(3, 2, 3, 2);
|
||||
DataGridView.Location = new Point(11, 31);
|
||||
DataGridView.Name = "DataGridView";
|
||||
DataGridView.RowHeadersWidth = 51;
|
||||
DataGridView.Size = new Size(881, 305);
|
||||
DataGridView.Size = new Size(1007, 407);
|
||||
DataGridView.TabIndex = 1;
|
||||
//
|
||||
// CreateOrderButton
|
||||
//
|
||||
CreateOrderButton.Location = new Point(897, 23);
|
||||
CreateOrderButton.Margin = new Padding(3, 2, 3, 2);
|
||||
CreateOrderButton.Location = new Point(1025, 31);
|
||||
CreateOrderButton.Name = "CreateOrderButton";
|
||||
CreateOrderButton.Size = new Size(227, 22);
|
||||
CreateOrderButton.Size = new Size(259, 29);
|
||||
CreateOrderButton.TabIndex = 2;
|
||||
CreateOrderButton.Text = "Создать заказ";
|
||||
CreateOrderButton.UseVisualStyleBackColor = true;
|
||||
@ -129,10 +127,9 @@
|
||||
//
|
||||
// TakeInWorkButton
|
||||
//
|
||||
TakeInWorkButton.Location = new Point(897, 50);
|
||||
TakeInWorkButton.Margin = new Padding(3, 2, 3, 2);
|
||||
TakeInWorkButton.Location = new Point(1025, 67);
|
||||
TakeInWorkButton.Name = "TakeInWorkButton";
|
||||
TakeInWorkButton.Size = new Size(227, 22);
|
||||
TakeInWorkButton.Size = new Size(259, 29);
|
||||
TakeInWorkButton.TabIndex = 3;
|
||||
TakeInWorkButton.Text = "Отдать заказ в работу";
|
||||
TakeInWorkButton.UseVisualStyleBackColor = true;
|
||||
@ -140,10 +137,9 @@
|
||||
//
|
||||
// ReadyButton
|
||||
//
|
||||
ReadyButton.Location = new Point(897, 76);
|
||||
ReadyButton.Margin = new Padding(3, 2, 3, 2);
|
||||
ReadyButton.Location = new Point(1025, 101);
|
||||
ReadyButton.Name = "ReadyButton";
|
||||
ReadyButton.Size = new Size(227, 22);
|
||||
ReadyButton.Size = new Size(259, 29);
|
||||
ReadyButton.TabIndex = 4;
|
||||
ReadyButton.Text = "Заказ готов";
|
||||
ReadyButton.UseVisualStyleBackColor = true;
|
||||
@ -151,10 +147,9 @@
|
||||
//
|
||||
// IssuedButton
|
||||
//
|
||||
IssuedButton.Location = new Point(897, 102);
|
||||
IssuedButton.Margin = new Padding(3, 2, 3, 2);
|
||||
IssuedButton.Location = new Point(1025, 136);
|
||||
IssuedButton.Name = "IssuedButton";
|
||||
IssuedButton.Size = new Size(227, 22);
|
||||
IssuedButton.Size = new Size(259, 29);
|
||||
IssuedButton.TabIndex = 5;
|
||||
IssuedButton.Text = "Заказ выдан";
|
||||
IssuedButton.UseVisualStyleBackColor = true;
|
||||
@ -162,10 +157,9 @@
|
||||
//
|
||||
// RefreshButton
|
||||
//
|
||||
RefreshButton.Location = new Point(897, 128);
|
||||
RefreshButton.Margin = new Padding(3, 2, 3, 2);
|
||||
RefreshButton.Location = new Point(1025, 171);
|
||||
RefreshButton.Name = "RefreshButton";
|
||||
RefreshButton.Size = new Size(227, 22);
|
||||
RefreshButton.Size = new Size(259, 29);
|
||||
RefreshButton.TabIndex = 6;
|
||||
RefreshButton.Text = "Обновить";
|
||||
RefreshButton.UseVisualStyleBackColor = true;
|
||||
@ -173,9 +167,9 @@
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1134, 338);
|
||||
ClientSize = new Size(1296, 451);
|
||||
Controls.Add(RefreshButton);
|
||||
Controls.Add(IssuedButton);
|
||||
Controls.Add(ReadyButton);
|
||||
@ -184,7 +178,6 @@
|
||||
Controls.Add(DataGridView);
|
||||
Controls.Add(menuStrip1);
|
||||
MainMenuStrip = menuStrip1;
|
||||
Margin = new Padding(3, 2, 3, 2);
|
||||
Name = "MainForm";
|
||||
Text = "Форма главная";
|
||||
Load += MainForm_Load;
|
||||
@ -208,7 +201,7 @@
|
||||
private Button IssuedButton;
|
||||
private Button RefreshButton;
|
||||
private ToolStripMenuItem отчетыToolStripMenuItem;
|
||||
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
|
||||
private ToolStripMenuItem списокМороженногоToolStripMenuItem;
|
||||
private ToolStripMenuItem компонентыПоМороженнымToolStripMenuItem;
|
||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ Program.ServiceProvider?.GetService(typeof(OrderForm));
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void списокКомпонентовToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private void списокМороженногоToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
|
63
IceCreamShop/IceCreamShop/Properties/Resources.Designer.cs
generated
Normal file
63
IceCreamShop/IceCreamShop/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код создан программой.
|
||||
// Исполняемая версия:4.0.30319.42000
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace IceCreamShop.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
/// </summary>
|
||||
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||
// с помощью такого средства, как ResGen или Visual Studio.
|
||||
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||
// с параметром /str или перестройте свой проект VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IceCreamShop.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
IceCreamShop/IceCreamShop/Properties/Resources.resx
Normal file
120
IceCreamShop/IceCreamShop/Properties/Resources.resx
Normal 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>
|
@ -74,7 +74,7 @@ namespace IceCreamShopBusinessLogic.BusinessLogic
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
public void SaveComponentsToWordFile(ReportBindingModel model)
|
||||
public void SaveIceCreamsToWordFile(ReportBindingModel model)
|
||||
{
|
||||
_saveToWord.CreateDoc(new WordInfo
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user