From 20894b792d1cb525773007c5a9145b6ad658971b Mon Sep 17 00:00:00 2001 From: Salikh Date: Thu, 4 Apr 2024 02:10:55 +0400 Subject: [PATCH] second commit --- .../ViewModels/ReportOrdersViewModel.cs | 8 +- .../MotorPlantView/FormMain.Designer.cs | 81 ++- MotorPlant/MotorPlantView/FormMain.cs | 33 +- .../FormReportEngineComponents.cs | 4 +- .../FormReportOrders.Designer.cs | 137 +++++ MotorPlant/MotorPlantView/FormReportOrders.cs | 92 +++ .../MotorPlantView/FormReportOrders.resx | 120 ++++ .../MotorPlantView/MotorPlantView.csproj | 16 + .../Properties/Resources.Designer.cs | 63 ++ .../MotorPlantView/Properties/Resources.resx | 120 ++++ MotorPlant/MotorPlantView/ReportOrders.rdlc | 561 ++++++++++++++++-- 11 files changed, 1160 insertions(+), 75 deletions(-) create mode 100644 MotorPlant/MotorPlantView/FormReportOrders.Designer.cs create mode 100644 MotorPlant/MotorPlantView/FormReportOrders.cs create mode 100644 MotorPlant/MotorPlantView/FormReportOrders.resx create mode 100644 MotorPlant/MotorPlantView/Properties/Resources.Designer.cs create mode 100644 MotorPlant/MotorPlantView/Properties/Resources.resx diff --git a/MotorPlant/MotorPlantContracts/ViewModels/ReportOrdersViewModel.cs b/MotorPlant/MotorPlantContracts/ViewModels/ReportOrdersViewModel.cs index 0fc5a0e..a30a6c4 100644 --- a/MotorPlant/MotorPlantContracts/ViewModels/ReportOrdersViewModel.cs +++ b/MotorPlant/MotorPlantContracts/ViewModels/ReportOrdersViewModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MotorPlantContracts.ViewModels +namespace MotorPlantContracts.ViewModels { public class ReportOrdersViewModel { diff --git a/MotorPlant/MotorPlantView/FormMain.Designer.cs b/MotorPlant/MotorPlantView/FormMain.Designer.cs index 1673d78..77a042d 100644 --- a/MotorPlant/MotorPlantView/FormMain.Designer.cs +++ b/MotorPlant/MotorPlantView/FormMain.Designer.cs @@ -32,6 +32,10 @@ toolStripDropDownButton1 = new ToolStripDropDownButton(); КомпонентыToolStripMenuItem = new ToolStripMenuItem(); ДвигателиToolStripMenuItem = new ToolStripMenuItem(); + отчетыToolStripMenuItem = new ToolStripMenuItem(); + списокДвигателейToolStripMenuItem = new ToolStripMenuItem(); + компонентыПоДвигателямToolStripMenuItem = new ToolStripMenuItem(); + списокЗаказовToolStripMenuItem = new ToolStripMenuItem(); buttonCreateOrder = new Button(); buttonTakeOrderInWork = new Button(); buttonOrderReady = new Button(); @@ -45,10 +49,10 @@ // toolStrip1 // toolStrip1.ImageScalingSize = new Size(20, 20); - toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripDropDownButton1 }); + toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripDropDownButton1, отчетыToolStripMenuItem }); toolStrip1.Location = new Point(0, 0); toolStrip1.Name = "toolStrip1"; - toolStrip1.Size = new Size(1126, 27); + toolStrip1.Size = new Size(985, 25); toolStrip1.TabIndex = 0; toolStrip1.Text = "toolStrip1"; // @@ -58,31 +62,58 @@ toolStripDropDownButton1.DropDownItems.AddRange(new ToolStripItem[] { КомпонентыToolStripMenuItem, ДвигателиToolStripMenuItem }); toolStripDropDownButton1.ImageTransparentColor = Color.Magenta; toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - toolStripDropDownButton1.Size = new Size(108, 24); + toolStripDropDownButton1.Size = new Size(88, 22); toolStripDropDownButton1.Text = "Справочник"; // // КомпонентыToolStripMenuItem // КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem"; - КомпонентыToolStripMenuItem.Size = new Size(224, 26); + КомпонентыToolStripMenuItem.Size = new Size(145, 22); КомпонентыToolStripMenuItem.Text = "Компоненты"; КомпонентыToolStripMenuItem.Click += КомпонентыToolStripMenuItem_Click; // // ДвигателиToolStripMenuItem // ДвигателиToolStripMenuItem.Name = "ДвигателиToolStripMenuItem"; - ДвигателиToolStripMenuItem.Size = new Size(224, 26); + ДвигателиToolStripMenuItem.Size = new Size(145, 22); ДвигателиToolStripMenuItem.Text = "Двигатели"; ДвигателиToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click; // + // отчетыToolStripMenuItem + // + отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокДвигателейToolStripMenuItem, компонентыПоДвигателямToolStripMenuItem, списокЗаказовToolStripMenuItem }); + отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem"; + отчетыToolStripMenuItem.Size = new Size(60, 25); + отчетыToolStripMenuItem.Text = "Отчеты"; + // + // списокДвигателейToolStripMenuItem + // + списокДвигателейToolStripMenuItem.Name = "списокДвигателейToolStripMenuItem"; + списокДвигателейToolStripMenuItem.Size = new Size(228, 22); + списокДвигателейToolStripMenuItem.Text = "Список двигателей"; + списокДвигателейToolStripMenuItem.Click += списокДвигателейToolStripMenuItem_Click; + // + // компонентыПоДвигателямToolStripMenuItem + // + компонентыПоДвигателямToolStripMenuItem.Name = "компонентыПоДвигателямToolStripMenuItem"; + компонентыПоДвигателямToolStripMenuItem.Size = new Size(228, 22); + компонентыПоДвигателямToolStripMenuItem.Text = "Компоненты по двигателям"; + компонентыПоДвигателямToolStripMenuItem.Click += компонентыПоДвигателямToolStripMenuItem_Click; + // + // списокЗаказовToolStripMenuItem + // + списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem"; + списокЗаказовToolStripMenuItem.Size = new Size(228, 22); + списокЗаказовToolStripMenuItem.Text = "Список заказов"; + списокЗаказовToolStripMenuItem.Click += списокЗаказовToolStripMenuItem_Click; + // // buttonCreateOrder // buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonCreateOrder.BackColor = SystemColors.ControlLight; - buttonCreateOrder.Location = new Point(911, 195); - buttonCreateOrder.Margin = new Padding(3, 4, 3, 4); + buttonCreateOrder.Location = new Point(797, 146); buttonCreateOrder.Name = "buttonCreateOrder"; - buttonCreateOrder.Size = new Size(203, 40); + buttonCreateOrder.Size = new Size(178, 30); buttonCreateOrder.TabIndex = 1; buttonCreateOrder.Text = "Создать заказ"; buttonCreateOrder.UseVisualStyleBackColor = false; @@ -92,10 +123,9 @@ // buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonTakeOrderInWork.BackColor = SystemColors.ControlLight; - buttonTakeOrderInWork.Location = new Point(911, 258); - buttonTakeOrderInWork.Margin = new Padding(3, 4, 3, 4); + buttonTakeOrderInWork.Location = new Point(797, 194); buttonTakeOrderInWork.Name = "buttonTakeOrderInWork"; - buttonTakeOrderInWork.Size = new Size(203, 40); + buttonTakeOrderInWork.Size = new Size(178, 30); buttonTakeOrderInWork.TabIndex = 2; buttonTakeOrderInWork.Text = "Отдать на выполнение"; buttonTakeOrderInWork.UseVisualStyleBackColor = false; @@ -105,10 +135,9 @@ // buttonOrderReady.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonOrderReady.BackColor = SystemColors.ControlLight; - buttonOrderReady.Location = new Point(911, 323); - buttonOrderReady.Margin = new Padding(3, 4, 3, 4); + buttonOrderReady.Location = new Point(797, 242); buttonOrderReady.Name = "buttonOrderReady"; - buttonOrderReady.Size = new Size(203, 40); + buttonOrderReady.Size = new Size(178, 30); buttonOrderReady.TabIndex = 3; buttonOrderReady.Text = "Заказ готов"; buttonOrderReady.UseVisualStyleBackColor = false; @@ -118,10 +147,9 @@ // buttonIssuedOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonIssuedOrder.BackColor = SystemColors.ControlLight; - buttonIssuedOrder.Location = new Point(911, 383); - buttonIssuedOrder.Margin = new Padding(3, 4, 3, 4); + buttonIssuedOrder.Location = new Point(797, 287); buttonIssuedOrder.Name = "buttonIssuedOrder"; - buttonIssuedOrder.Size = new Size(203, 40); + buttonIssuedOrder.Size = new Size(178, 30); buttonIssuedOrder.TabIndex = 4; buttonIssuedOrder.Text = "Заказ выдан"; buttonIssuedOrder.UseVisualStyleBackColor = false; @@ -131,10 +159,9 @@ // buttonRef.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonRef.BackColor = SystemColors.ControlLight; - buttonRef.Location = new Point(911, 133); - buttonRef.Margin = new Padding(3, 4, 3, 4); + buttonRef.Location = new Point(797, 100); buttonRef.Name = "buttonRef"; - buttonRef.Size = new Size(203, 40); + buttonRef.Size = new Size(178, 30); buttonRef.TabIndex = 5; buttonRef.Text = "Обновить список"; buttonRef.UseVisualStyleBackColor = false; @@ -145,21 +172,20 @@ dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; dataGridView.BackgroundColor = SystemColors.ButtonHighlight; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView.Location = new Point(0, 35); - dataGridView.Margin = new Padding(3, 4, 3, 4); + dataGridView.Location = new Point(0, 26); dataGridView.Name = "dataGridView"; dataGridView.ReadOnly = true; dataGridView.RowHeadersWidth = 51; dataGridView.RowTemplate.Height = 24; dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView.Size = new Size(891, 588); + dataGridView.Size = new Size(780, 441); dataGridView.TabIndex = 6; // // FormMain // - AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(1126, 623); + ClientSize = new Size(985, 467); Controls.Add(dataGridView); Controls.Add(buttonRef); Controls.Add(buttonIssuedOrder); @@ -167,7 +193,6 @@ Controls.Add(buttonTakeOrderInWork); Controls.Add(buttonCreateOrder); Controls.Add(toolStrip1); - Margin = new Padding(3, 4, 3, 4); Name = "FormMain"; Text = "Моторный завод"; Load += FormMain_Load; @@ -190,5 +215,9 @@ private ToolStripDropDownButton toolStripDropDownButton1; private ToolStripMenuItem КомпонентыToolStripMenuItem; private ToolStripMenuItem ДвигателиToolStripMenuItem; + private ToolStripMenuItem отчетыToolStripMenuItem; + private ToolStripMenuItem списокДвигателейToolStripMenuItem; + private ToolStripMenuItem компонентыПоДвигателямToolStripMenuItem; + private ToolStripMenuItem списокЗаказовToolStripMenuItem; } } \ No newline at end of file diff --git a/MotorPlant/MotorPlantView/FormMain.cs b/MotorPlant/MotorPlantView/FormMain.cs index 06f7132..b4b6368 100644 --- a/MotorPlant/MotorPlantView/FormMain.cs +++ b/MotorPlant/MotorPlantView/FormMain.cs @@ -8,11 +8,14 @@ namespace MotorPlantView.Forms { private readonly ILogger _logger; private readonly IOrderLogic _orderLogic; - public FormMain(ILogger logger, IOrderLogic orderLogic) + private readonly IReportLogic _reportLogic; + + public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic) { InitializeComponent(); _logger = logger; _orderLogic = orderLogic; + _reportLogic = reportLogic; } private void FormMain_Load(object sender, EventArgs e) { @@ -143,5 +146,33 @@ namespace MotorPlantView.Forms { LoadData(); } + + private void списокДвигателейToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveEngineToWordFile(new ReportBindingModel { FileName = dialog.FileName }); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void компонентыПоДвигателямToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportEngineComponents)); + if (service is FormReportEngineComponents form) + { + form.ShowDialog(); + } + } + + private void списокЗаказовToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders)); + if (service is FormReportOrders form) + { + form.ShowDialog(); + } + } } } diff --git a/MotorPlant/MotorPlantView/FormReportEngineComponents.cs b/MotorPlant/MotorPlantView/FormReportEngineComponents.cs index d25797a..864db71 100644 --- a/MotorPlant/MotorPlantView/FormReportEngineComponents.cs +++ b/MotorPlant/MotorPlantView/FormReportEngineComponents.cs @@ -36,11 +36,11 @@ namespace MotorPlantView dataGridView.Rows.Add(Array.Empty()); } } - _logger.LogInformation("Loading list of ice creams with components"); + _logger.LogInformation("Loading list of engines with components"); } catch (Exception ex) { - _logger.LogError(ex, "Loading list of ice creams with components error"); + _logger.LogError(ex, "Loading list of engines with components error"); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } diff --git a/MotorPlant/MotorPlantView/FormReportOrders.Designer.cs b/MotorPlant/MotorPlantView/FormReportOrders.Designer.cs new file mode 100644 index 0000000..06b3199 --- /dev/null +++ b/MotorPlant/MotorPlantView/FormReportOrders.Designer.cs @@ -0,0 +1,137 @@ +namespace MotorPlantView +{ + partial class FormReportOrders + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + panel = new Panel(); + buttonToPdf = new Button(); + buttonCreateReport = new Button(); + dateTimePickerTo = new DateTimePicker(); + labelTo = new Label(); + dateTimePickerFrom = new DateTimePicker(); + labelFrom = new Label(); + panel.SuspendLayout(); + SuspendLayout(); + // + // panel + // + panel.Controls.Add(buttonToPdf); + panel.Controls.Add(buttonCreateReport); + panel.Controls.Add(dateTimePickerTo); + panel.Controls.Add(labelTo); + panel.Controls.Add(dateTimePickerFrom); + panel.Controls.Add(labelFrom); + panel.Dock = DockStyle.Top; + panel.Location = new Point(0, 0); + panel.Name = "panel"; + panel.Size = new Size(1019, 38); + panel.TabIndex = 0; + // + // buttonToPdf + // + buttonToPdf.Anchor = AnchorStyles.Top | AnchorStyles.Right; + buttonToPdf.Location = new Point(866, 5); + buttonToPdf.Margin = new Padding(4, 3, 4, 3); + buttonToPdf.Name = "buttonToPdf"; + buttonToPdf.Size = new Size(139, 27); + buttonToPdf.TabIndex = 6; + buttonToPdf.Text = "В Pdf"; + buttonToPdf.UseVisualStyleBackColor = true; + buttonToPdf.Click += ButtonToPdf_Click; + // + // buttonCreateReport + // + buttonCreateReport.Location = new Point(565, 5); + buttonCreateReport.Margin = new Padding(4, 3, 4, 3); + buttonCreateReport.Name = "buttonCreateReport"; + buttonCreateReport.Size = new Size(139, 27); + buttonCreateReport.TabIndex = 5; + buttonCreateReport.Text = "Сформировать"; + buttonCreateReport.UseVisualStyleBackColor = true; + buttonCreateReport.Click += ButtonCreateReport_Click; + // + // dateTimePickerTo + // + dateTimePickerTo.Location = new Point(257, 8); + dateTimePickerTo.Margin = new Padding(4, 3, 4, 3); + dateTimePickerTo.Name = "dateTimePickerTo"; + dateTimePickerTo.Size = new Size(163, 23); + dateTimePickerTo.TabIndex = 4; + // + // labelTo + // + labelTo.AutoSize = true; + labelTo.Location = new Point(217, 11); + labelTo.Margin = new Padding(4, 0, 4, 0); + labelTo.Name = "labelTo"; + labelTo.Size = new Size(21, 15); + labelTo.TabIndex = 3; + labelTo.Text = "по"; + // + // dateTimePickerFrom + // + dateTimePickerFrom.Location = new Point(36, 8); + dateTimePickerFrom.Margin = new Padding(4, 3, 4, 3); + dateTimePickerFrom.Name = "dateTimePickerFrom"; + dateTimePickerFrom.Size = new Size(163, 23); + dateTimePickerFrom.TabIndex = 2; + // + // labelFrom + // + labelFrom.AutoSize = true; + labelFrom.Location = new Point(13, 11); + labelFrom.Margin = new Padding(4, 0, 4, 0); + labelFrom.Name = "labelFrom"; + labelFrom.Size = new Size(15, 15); + labelFrom.TabIndex = 1; + labelFrom.Text = "С"; + // + // FormReportOrders + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1019, 450); + Controls.Add(panel); + Name = "FormReportOrders"; + Text = "FormReportOrders"; + panel.ResumeLayout(false); + panel.PerformLayout(); + ResumeLayout(false); + } + + #endregion + + private Panel panel; + private Label labelFrom; + private Button buttonToPdf; + private Button buttonCreateReport; + private DateTimePicker dateTimePickerTo; + private Label labelTo; + private DateTimePicker dateTimePickerFrom; + } +} \ No newline at end of file diff --git a/MotorPlant/MotorPlantView/FormReportOrders.cs b/MotorPlant/MotorPlantView/FormReportOrders.cs new file mode 100644 index 0000000..fe73e79 --- /dev/null +++ b/MotorPlant/MotorPlantView/FormReportOrders.cs @@ -0,0 +1,92 @@ +using MotorPlantContracts.BindingModels; +using MotorPlantContracts.BusinessLogicsContracts; +using Microsoft.Extensions.Logging; +using Microsoft.Reporting.WinForms; + + +namespace MotorPlantView +{ + public partial class FormReportOrders : Form + { + private readonly ReportViewer reportViewer; + + private readonly ILogger _logger; + + private readonly IReportLogic _logic; + + public FormReportOrders(ILogger logger, IReportLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + reportViewer = new ReportViewer + { + Dock = DockStyle.Fill + }; + reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open)); + Controls.Clear(); + Controls.Add(reportViewer); + Controls.Add(panel); + } + + private void ButtonCreateReport_Click(object sender, EventArgs e) + { + if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) + { + MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + try + { + var dataSource = _logic.GetOrders(new ReportBindingModel + { + DateFrom = dateTimePickerFrom.Value, + DateTo = dateTimePickerTo.Value + }); + var source = new ReportDataSource("DataSetOrders", dataSource); + reportViewer.LocalReport.DataSources.Clear(); + reportViewer.LocalReport.DataSources.Add(source); + var parameters = new[] { new ReportParameter("ReportParameterPeriod", + $"c {dateTimePickerFrom.Value.ToShortDateString()} по {dateTimePickerTo.Value.ToShortDateString()}") }; + reportViewer.LocalReport.SetParameters(parameters); + + reportViewer.RefreshReport(); + _logger.LogInformation("Loading list of orders for period {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); + } + catch (Exception ex) + { + _logger.LogError(ex, "Loading list of orders for period error"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ButtonToPdf_Click(object sender, EventArgs e) + { + if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) + { + MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + _logic.SaveOrdersToPdfFile(new ReportBindingModel + { + FileName = dialog.FileName, + DateFrom = dateTimePickerFrom.Value, + DateTo = dateTimePickerTo.Value + }); + _logger.LogInformation("Saving list of orders for period {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + _logger.LogError(ex, "Saving list of orders for period error"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + } +} diff --git a/MotorPlant/MotorPlantView/FormReportOrders.resx b/MotorPlant/MotorPlantView/FormReportOrders.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/MotorPlant/MotorPlantView/FormReportOrders.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MotorPlant/MotorPlantView/MotorPlantView.csproj b/MotorPlant/MotorPlantView/MotorPlantView.csproj index 88a413b..9251386 100644 --- a/MotorPlant/MotorPlantView/MotorPlantView.csproj +++ b/MotorPlant/MotorPlantView/MotorPlantView.csproj @@ -28,6 +28,7 @@ + @@ -38,4 +39,19 @@ + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + \ No newline at end of file diff --git a/MotorPlant/MotorPlantView/Properties/Resources.Designer.cs b/MotorPlant/MotorPlantView/Properties/Resources.Designer.cs new file mode 100644 index 0000000..eae4a4d --- /dev/null +++ b/MotorPlant/MotorPlantView/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace MotorPlantView.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом 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() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [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("MotorPlantView.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/MotorPlant/MotorPlantView/Properties/Resources.resx b/MotorPlant/MotorPlantView/Properties/Resources.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MotorPlant/MotorPlantView/Properties/Resources.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MotorPlant/MotorPlantView/ReportOrders.rdlc b/MotorPlant/MotorPlantView/ReportOrders.rdlc index 8b18fa3..4eae60b 100644 --- a/MotorPlant/MotorPlantView/ReportOrders.rdlc +++ b/MotorPlant/MotorPlantView/ReportOrders.rdlc @@ -1,43 +1,54 @@ 0 + + + + System.Data.DataSet + /* Local Connection */ + + 47cb53f0-7dde-4717-ba03-866a0bc4f4dd + + + + + + MotorPlantContractsViewModels + /* Local Query */ + + + + Id + System.Int32 + + + DateCreate + System.DateTime + + + EngineName + System.String + + + Sum + System.Decimal + + + OrderStatus + MotorPlantDataModels.OrderStatus + + + + MorotPlantContracts.ViewModels + ReportOrderViewModel + MorotPlantContracts.ViewModels.ReportOrderViewModel, MorotPlantContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + - - true - true - - - - - Заказы - - - - - - - 0cm - 1cm - 21cm - - - Middle - 2pt - 2pt - 2pt - 2pt - - true true @@ -58,9 +69,40 @@ ReportParameterPeriod - 1.03528cm - 0cm - 1.15563cm + 1cm + 1cm + 21cm + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Заказы + + + + + + + 1cm 21cm 1 + + + + + 2.5cm + + + 3.21438cm + + + 8.23317cm + + + 2.5cm + + + 2.5cm + + + + + 0.6cm + + + + + true + true + + + + + Номер + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Дата создания + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Двигатели + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Статус Заказа + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Сумма + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Id.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DateCreate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!EngineName.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!OrderStatus.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Sum.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSetOrders + 2.48391cm + 0.55245cm + 1.2cm + 18.94755cm + 2 + + + + + + true + true + + + + + Итого: + + + + + + + 4cm + 12cm + 0.6cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Sum.Value, "DataSetOrders") + + + + + + + 4cm + 14.5cm + 0.6cm + 2.5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + - 2in + 5.72875cm