diff --git a/PrecastConcretePlant/FormMain.Designer.cs b/PrecastConcretePlant/FormMain.Designer.cs
index d84c0d9..278f9e3 100644
--- a/PrecastConcretePlant/FormMain.Designer.cs
+++ b/PrecastConcretePlant/FormMain.Designer.cs
@@ -28,203 +28,218 @@
///
private void InitializeComponent()
{
- 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.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокЖБИToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.DataGridView = new System.Windows.Forms.DataGridView();
- this.CreateOrderButton = new System.Windows.Forms.Button();
- this.TakeOrderInWorkButton = new System.Windows.Forms.Button();
- this.OrderReadyButton = new System.Windows.Forms.Button();
- this.IssuedOrderButton = new System.Windows.Forms.Button();
- this.UpdateListButton = new System.Windows.Forms.Button();
- this.AddShopButton = new System.Windows.Forms.Button();
- this.ButtonSell = new System.Windows.Forms.Button();
- this.MenuStrip.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit();
- this.SuspendLayout();
+ MenuStrip = new MenuStrip();
+ СправочникиToolStripMenuItem = new ToolStripMenuItem();
+ ИзделияToolStripMenuItem = new ToolStripMenuItem();
+ КомпонентыToolStripMenuItem = new ToolStripMenuItem();
+ магазиныToolStripMenuItem = new ToolStripMenuItem();
+ отчетыToolStripMenuItem = new ToolStripMenuItem();
+ списокЖБИToolStripMenuItem = new ToolStripMenuItem();
+ компонентыПоИзделиямToolStripMenuItem = new ToolStripMenuItem();
+ списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
+ DataGridView = new DataGridView();
+ CreateOrderButton = new Button();
+ TakeOrderInWorkButton = new Button();
+ OrderReadyButton = new Button();
+ IssuedOrderButton = new Button();
+ UpdateListButton = new Button();
+ AddShopButton = new Button();
+ ButtonSell = new Button();
+ списокМагазиновToolStripMenuItem = new ToolStripMenuItem();
+ загруженностьМагазиновToolStripMenuItem = new ToolStripMenuItem();
+ заказыПоДатамToolStripMenuItem = new ToolStripMenuItem();
+ MenuStrip.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)DataGridView).BeginInit();
+ SuspendLayout();
//
// MenuStrip
//
- this.MenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.СправочникиToolStripMenuItem,
- this.отчетыToolStripMenuItem});
- this.MenuStrip.Location = new System.Drawing.Point(0, 0);
- this.MenuStrip.Name = "MenuStrip";
- this.MenuStrip.Size = new System.Drawing.Size(953, 24);
- this.MenuStrip.TabIndex = 0;
- this.MenuStrip.Text = "menuStrip1";
+ MenuStrip.Items.AddRange(new ToolStripItem[] { СправочникиToolStripMenuItem, отчетыToolStripMenuItem });
+ MenuStrip.Location = new Point(0, 0);
+ MenuStrip.Name = "MenuStrip";
+ MenuStrip.Size = new Size(953, 24);
+ MenuStrip.TabIndex = 0;
+ MenuStrip.Text = "menuStrip1";
//
// СправочникиToolStripMenuItem
//
- this.СправочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.ИзделияToolStripMenuItem,
- this.КомпонентыToolStripMenuItem,
- this.магазиныToolStripMenuItem});
- this.СправочникиToolStripMenuItem.Name = "СправочникиToolStripMenuItem";
- this.СправочникиToolStripMenuItem.Size = new System.Drawing.Size(94, 20);
- this.СправочникиToolStripMenuItem.Text = "Cправочники";
+ СправочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ИзделияToolStripMenuItem, КомпонентыToolStripMenuItem, магазиныToolStripMenuItem });
+ СправочникиToolStripMenuItem.Name = "СправочникиToolStripMenuItem";
+ СправочникиToolStripMenuItem.Size = new Size(94, 20);
+ СправочникиToolStripMenuItem.Text = "Cправочники";
//
// ИзделияToolStripMenuItem
//
- this.ИзделияToolStripMenuItem.Name = "ИзделияToolStripMenuItem";
- this.ИзделияToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
- this.ИзделияToolStripMenuItem.Text = "ЖБИ";
- this.ИзделияToolStripMenuItem.Click += new System.EventHandler(this.ИзделияToolStripMenuItem_Click);
+ ИзделияToolStripMenuItem.Name = "ИзделияToolStripMenuItem";
+ ИзделияToolStripMenuItem.Size = new Size(145, 22);
+ ИзделияToolStripMenuItem.Text = "ЖБИ";
+ ИзделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click;
//
// КомпонентыToolStripMenuItem
//
- this.КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem";
- this.КомпонентыToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
- this.КомпонентыToolStripMenuItem.Text = "Компоненты";
- this.КомпонентыToolStripMenuItem.Click += new System.EventHandler(this.КомпонентыToolStripMenuItem_Click);
- //
- // отчетыToolStripMenuItem
- //
- this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.списокЖБИToolStripMenuItem,
- this.компонентыПоИзделиямToolStripMenuItem,
- this.списокЗаказовToolStripMenuItem});
- this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
- this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
- this.отчетыToolStripMenuItem.Text = "Отчеты";
- //
- // списокЖБИToolStripMenuItem
- //
- this.списокЖБИToolStripMenuItem.Name = "списокЖБИToolStripMenuItem";
- this.списокЖБИToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
- this.списокЖБИToolStripMenuItem.Text = "Список ЖБИ";
- this.списокЖБИToolStripMenuItem.Click += new System.EventHandler(this.списокИзделийToolStripMenuItem_Click);
- //
- // компонентыПоИзделиямToolStripMenuItem
- //
- this.компонентыПоИзделиямToolStripMenuItem.Name = "компонентыПоИзделиямToolStripMenuItem";
- this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
- this.компонентыПоИзделиямToolStripMenuItem.Text = "ЖБИ по компонентам";
- this.компонентыПоИзделиямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоИзделиямToolStripMenuItem_Click);
- //
- // списокЗаказовToolStripMenuItem
- //
- this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
- this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
- this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
- this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовToolStripMenuItem_Click);
+ КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem";
+ КомпонентыToolStripMenuItem.Size = new Size(145, 22);
+ КомпонентыToolStripMenuItem.Text = "Компоненты";
+ КомпонентыToolStripMenuItem.Click += КомпонентыToolStripMenuItem_Click;
//
// магазиныToolStripMenuItem
//
- this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
- this.магазиныToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
- this.магазиныToolStripMenuItem.Text = "Магазины";
- this.магазиныToolStripMenuItem.Click += new System.EventHandler(this.магазиныToolStripMenuItem_Click);
+ магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
+ магазиныToolStripMenuItem.Size = new Size(145, 22);
+ магазиныToolStripMenuItem.Text = "Магазины";
+ магазиныToolStripMenuItem.Click += магазиныToolStripMenuItem_Click;
+ //
+ // отчетыToolStripMenuItem
+ //
+ отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокЖБИToolStripMenuItem, компонентыПоИзделиямToolStripMenuItem, списокЗаказовToolStripMenuItem, списокМагазиновToolStripMenuItem, загруженностьМагазиновToolStripMenuItem, заказыПоДатамToolStripMenuItem });
+ отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
+ отчетыToolStripMenuItem.Size = new Size(60, 20);
+ отчетыToolStripMenuItem.Text = "Отчеты";
+ //
+ // списокЖБИToolStripMenuItem
+ //
+ списокЖБИToolStripMenuItem.Name = "списокЖБИToolStripMenuItem";
+ списокЖБИToolStripMenuItem.Size = new Size(219, 22);
+ списокЖБИToolStripMenuItem.Text = "Список ЖБИ";
+ списокЖБИToolStripMenuItem.Click += списокИзделийToolStripMenuItem_Click;
+ //
+ // компонентыПоИзделиямToolStripMenuItem
+ //
+ компонентыПоИзделиямToolStripMenuItem.Name = "компонентыПоИзделиямToolStripMenuItem";
+ компонентыПоИзделиямToolStripMenuItem.Size = new Size(219, 22);
+ компонентыПоИзделиямToolStripMenuItem.Text = "ЖБИ по компонентам";
+ компонентыПоИзделиямToolStripMenuItem.Click += компонентыПоИзделиямToolStripMenuItem_Click;
+ //
+ // списокЗаказовToolStripMenuItem
+ //
+ списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
+ списокЗаказовToolStripMenuItem.Size = new Size(219, 22);
+ списокЗаказовToolStripMenuItem.Text = "Список заказов";
+ списокЗаказовToolStripMenuItem.Click += списокЗаказовToolStripMenuItem_Click;
//
// DataGridView
//
- this.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.DataGridView.Location = new System.Drawing.Point(0, 27);
- this.DataGridView.Name = "DataGridView";
- this.DataGridView.RowTemplate.Height = 25;
- this.DataGridView.Size = new System.Drawing.Size(805, 421);
- this.DataGridView.TabIndex = 1;
+ DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ DataGridView.Location = new Point(0, 27);
+ DataGridView.Name = "DataGridView";
+ DataGridView.RowTemplate.Height = 25;
+ DataGridView.Size = new Size(805, 421);
+ DataGridView.TabIndex = 1;
//
// CreateOrderButton
//
- this.CreateOrderButton.Location = new System.Drawing.Point(825, 27);
- this.CreateOrderButton.Name = "CreateOrderButton";
- this.CreateOrderButton.Size = new System.Drawing.Size(104, 33);
- this.CreateOrderButton.TabIndex = 2;
- this.CreateOrderButton.Text = "Создать заказ";
- this.CreateOrderButton.UseVisualStyleBackColor = true;
- this.CreateOrderButton.Click += new System.EventHandler(this.CreateOrderButton_Click);
+ CreateOrderButton.Location = new Point(825, 27);
+ CreateOrderButton.Name = "CreateOrderButton";
+ CreateOrderButton.Size = new Size(104, 33);
+ CreateOrderButton.TabIndex = 2;
+ CreateOrderButton.Text = "Создать заказ";
+ CreateOrderButton.UseVisualStyleBackColor = true;
+ CreateOrderButton.Click += CreateOrderButton_Click;
//
// TakeOrderInWorkButton
//
- this.TakeOrderInWorkButton.Location = new System.Drawing.Point(825, 66);
- this.TakeOrderInWorkButton.Name = "TakeOrderInWorkButton";
- this.TakeOrderInWorkButton.Size = new System.Drawing.Size(104, 39);
- this.TakeOrderInWorkButton.TabIndex = 3;
- this.TakeOrderInWorkButton.Text = "Отдать на выполнение";
- this.TakeOrderInWorkButton.UseVisualStyleBackColor = true;
- this.TakeOrderInWorkButton.Click += new System.EventHandler(this.TakeOrderInWorkButton_Click);
+ TakeOrderInWorkButton.Location = new Point(825, 66);
+ TakeOrderInWorkButton.Name = "TakeOrderInWorkButton";
+ TakeOrderInWorkButton.Size = new Size(104, 39);
+ TakeOrderInWorkButton.TabIndex = 3;
+ TakeOrderInWorkButton.Text = "Отдать на выполнение";
+ TakeOrderInWorkButton.UseVisualStyleBackColor = true;
+ TakeOrderInWorkButton.Click += TakeOrderInWorkButton_Click;
//
// OrderReadyButton
//
- this.OrderReadyButton.Location = new System.Drawing.Point(825, 111);
- this.OrderReadyButton.Name = "OrderReadyButton";
- this.OrderReadyButton.Size = new System.Drawing.Size(104, 33);
- this.OrderReadyButton.TabIndex = 4;
- this.OrderReadyButton.Text = "Заказ готов";
- this.OrderReadyButton.UseVisualStyleBackColor = true;
- this.OrderReadyButton.Click += new System.EventHandler(this.OrderReadyButton_Click);
+ OrderReadyButton.Location = new Point(825, 111);
+ OrderReadyButton.Name = "OrderReadyButton";
+ OrderReadyButton.Size = new Size(104, 33);
+ OrderReadyButton.TabIndex = 4;
+ OrderReadyButton.Text = "Заказ готов";
+ OrderReadyButton.UseVisualStyleBackColor = true;
+ OrderReadyButton.Click += OrderReadyButton_Click;
//
// IssuedOrderButton
//
- this.IssuedOrderButton.Location = new System.Drawing.Point(825, 150);
- this.IssuedOrderButton.Name = "IssuedOrderButton";
- this.IssuedOrderButton.Size = new System.Drawing.Size(104, 33);
- this.IssuedOrderButton.TabIndex = 5;
- this.IssuedOrderButton.Text = "Заказ выдан";
- this.IssuedOrderButton.UseVisualStyleBackColor = true;
- this.IssuedOrderButton.Click += new System.EventHandler(this.IssuedOrderButton_Click);
+ IssuedOrderButton.Location = new Point(825, 150);
+ IssuedOrderButton.Name = "IssuedOrderButton";
+ IssuedOrderButton.Size = new Size(104, 33);
+ IssuedOrderButton.TabIndex = 5;
+ IssuedOrderButton.Text = "Заказ выдан";
+ IssuedOrderButton.UseVisualStyleBackColor = true;
+ IssuedOrderButton.Click += IssuedOrderButton_Click;
//
// UpdateListButton
//
- this.UpdateListButton.Location = new System.Drawing.Point(825, 189);
- this.UpdateListButton.Name = "UpdateListButton";
- this.UpdateListButton.Size = new System.Drawing.Size(104, 33);
- this.UpdateListButton.TabIndex = 6;
- this.UpdateListButton.Text = "Обновить список";
- this.UpdateListButton.UseVisualStyleBackColor = true;
- this.UpdateListButton.Click += new System.EventHandler(this.UpdateListButton_Click);
+ UpdateListButton.Location = new Point(825, 189);
+ UpdateListButton.Name = "UpdateListButton";
+ UpdateListButton.Size = new Size(104, 33);
+ UpdateListButton.TabIndex = 6;
+ UpdateListButton.Text = "Обновить список";
+ UpdateListButton.UseVisualStyleBackColor = true;
+ UpdateListButton.Click += UpdateListButton_Click;
//
// AddShopButton
//
- this.AddShopButton.Location = new System.Drawing.Point(825, 228);
- this.AddShopButton.Name = "AddShopButton";
- this.AddShopButton.Size = new System.Drawing.Size(104, 38);
- this.AddShopButton.TabIndex = 7;
- this.AddShopButton.Text = "Добавить в магазин";
- this.AddShopButton.UseVisualStyleBackColor = true;
- this.AddShopButton.Click += new System.EventHandler(this.AddShopButton_Click);
+ AddShopButton.Location = new Point(825, 228);
+ AddShopButton.Name = "AddShopButton";
+ AddShopButton.Size = new Size(104, 38);
+ AddShopButton.TabIndex = 7;
+ AddShopButton.Text = "Добавить в магазин";
+ AddShopButton.UseVisualStyleBackColor = true;
+ AddShopButton.Click += AddShopButton_Click;
//
// ButtonSell
//
- this.ButtonSell.Location = new System.Drawing.Point(825, 272);
- this.ButtonSell.Name = "ButtonSell";
- this.ButtonSell.Size = new System.Drawing.Size(104, 38);
- this.ButtonSell.TabIndex = 8;
- this.ButtonSell.Text = "Продать";
- this.ButtonSell.UseVisualStyleBackColor = true;
- this.ButtonSell.Click += new System.EventHandler(this.ButtonSell_Click);
+ ButtonSell.Location = new Point(825, 272);
+ ButtonSell.Name = "ButtonSell";
+ ButtonSell.Size = new Size(104, 38);
+ ButtonSell.TabIndex = 8;
+ ButtonSell.Text = "Продать";
+ ButtonSell.UseVisualStyleBackColor = true;
+ ButtonSell.Click += ButtonSell_Click;
+ //
+ // списокМагазиновToolStripMenuItem
+ //
+ списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem";
+ списокМагазиновToolStripMenuItem.Size = new Size(219, 22);
+ списокМагазиновToolStripMenuItem.Text = "Список магазинов";
+ списокМагазиновToolStripMenuItem.Click += списокМагазиновToolStripMenuItem_Click;
+ //
+ // загруженностьМагазиновToolStripMenuItem
+ //
+ загруженностьМагазиновToolStripMenuItem.Name = "загруженностьМагазиновToolStripMenuItem";
+ загруженностьМагазиновToolStripMenuItem.Size = new Size(219, 22);
+ загруженностьМагазиновToolStripMenuItem.Text = "Загруженность магазинов";
+ загруженностьМагазиновToolStripMenuItem.Click += загруженностьМагазиновToolStripMenuItem_Click;
+ //
+ // заказыПоДатамToolStripMenuItem
+ //
+ заказыПоДатамToolStripMenuItem.Name = "заказыПоДатамToolStripMenuItem";
+ заказыПоДатамToolStripMenuItem.Size = new Size(219, 22);
+ заказыПоДатамToolStripMenuItem.Text = "Заказы по датам";
+ заказыПоДатамToolStripMenuItem.Click += заказыПоДатамToolStripMenuItem_Click;
//
// FormMain
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(953, 450);
- this.Controls.Add(this.ButtonSell);
- this.Controls.Add(this.AddShopButton);
- this.Controls.Add(this.UpdateListButton);
- this.Controls.Add(this.IssuedOrderButton);
- this.Controls.Add(this.OrderReadyButton);
- this.Controls.Add(this.TakeOrderInWorkButton);
- this.Controls.Add(this.CreateOrderButton);
- this.Controls.Add(this.DataGridView);
- this.Controls.Add(this.MenuStrip);
- this.MainMenuStrip = this.MenuStrip;
- this.Name = "FormMain";
- this.Text = "Завод ЖБИ";
- this.Load += new System.EventHandler(this.FormMain_Load);
- this.MenuStrip.ResumeLayout(false);
- this.MenuStrip.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
+ AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(953, 450);
+ Controls.Add(ButtonSell);
+ Controls.Add(AddShopButton);
+ Controls.Add(UpdateListButton);
+ Controls.Add(IssuedOrderButton);
+ Controls.Add(OrderReadyButton);
+ Controls.Add(TakeOrderInWorkButton);
+ Controls.Add(CreateOrderButton);
+ Controls.Add(DataGridView);
+ Controls.Add(MenuStrip);
+ MainMenuStrip = MenuStrip;
+ Name = "FormMain";
+ Text = "Завод ЖБИ";
+ Load += FormMain_Load;
+ MenuStrip.ResumeLayout(false);
+ MenuStrip.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)DataGridView).EndInit();
+ ResumeLayout(false);
+ PerformLayout();
}
#endregion
@@ -246,5 +261,8 @@
private ToolStripMenuItem магазиныToolStripMenuItem;
private Button AddShopButton;
private Button ButtonSell;
+ private ToolStripMenuItem списокМагазиновToolStripMenuItem;
+ private ToolStripMenuItem загруженностьМагазиновToolStripMenuItem;
+ private ToolStripMenuItem заказыПоДатамToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/PrecastConcretePlant/FormMain.cs b/PrecastConcretePlant/FormMain.cs
index f3daed0..12442b4 100644
--- a/PrecastConcretePlant/FormMain.cs
+++ b/PrecastConcretePlant/FormMain.cs
@@ -238,5 +238,33 @@ namespace PrecastConcretePlantView
LoadData();
}
}
+
+ private void списокМагазиновToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ _reportLogic.SaveShopsToWordFile(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(FormReportShopTravels));
+ if (service is FormReportShopTravels form)
+ {
+ form.ShowDialog();
+ }
+ }
+
+ private void заказыПоДатамToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ var service = Program.ServiceProvider?.GetService(typeof(FormReportOrdersByDate));
+ if (service is FormReportOrdersByDate form)
+ {
+ form.ShowDialog();
+ }
+ }
}
}
diff --git a/PrecastConcretePlant/FormReportOrdersByDate.Designer.cs b/PrecastConcretePlant/FormReportOrdersByDate.Designer.cs
new file mode 100644
index 0000000..b00641d
--- /dev/null
+++ b/PrecastConcretePlant/FormReportOrdersByDate.Designer.cs
@@ -0,0 +1,85 @@
+namespace PrecastConcretePlantView
+{
+ partial class FormReportOrdersByDate
+ {
+ ///
+ /// 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();
+ buttonMake = new Button();
+ panel.SuspendLayout();
+ SuspendLayout();
+ //
+ // panel
+ //
+ panel.Controls.Add(buttonToPDF);
+ panel.Controls.Add(buttonMake);
+ panel.Dock = DockStyle.Top;
+ panel.Location = new Point(0, 0);
+ panel.Name = "panel";
+ panel.Size = new Size(800, 58);
+ panel.TabIndex = 0;
+ //
+ // buttonToPDF
+ //
+ buttonToPDF.Location = new Point(618, 12);
+ buttonToPDF.Name = "buttonToPDF";
+ buttonToPDF.Size = new Size(170, 34);
+ buttonToPDF.TabIndex = 6;
+ buttonToPDF.Text = "В PDF";
+ buttonToPDF.UseVisualStyleBackColor = true;
+ buttonToPDF.Click += ButtonToPdf_Click;
+ //
+ // buttonMake
+ //
+ buttonMake.Location = new Point(12, 12);
+ buttonMake.Name = "buttonMake";
+ buttonMake.Size = new Size(170, 34);
+ buttonMake.TabIndex = 5;
+ buttonMake.Text = "Сформировать";
+ buttonMake.UseVisualStyleBackColor = true;
+ buttonMake.Click += ButtonMake_Click;
+ //
+ // FormReportOrdersByDate
+ //
+ AutoScaleDimensions = new SizeF(10F, 25F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(800, 450);
+ Controls.Add(panel);
+ Name = "FormReportOrdersByDate";
+ Text = "Заказы по датам";
+ panel.ResumeLayout(false);
+ ResumeLayout(false);
+ }
+
+ #endregion
+
+ private Panel panel;
+ private Button buttonMake;
+ private Button buttonToPDF;
+ }
+}
\ No newline at end of file
diff --git a/PrecastConcretePlant/FormReportOrdersByDate.cs b/PrecastConcretePlant/FormReportOrdersByDate.cs
new file mode 100644
index 0000000..206469e
--- /dev/null
+++ b/PrecastConcretePlant/FormReportOrdersByDate.cs
@@ -0,0 +1,79 @@
+using Microsoft.Extensions.Logging;
+using Microsoft.Reporting.WinForms;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace PrecastConcretePlantView
+{
+ public partial class FormReportOrdersByDate : Form
+ {
+ private readonly ReportViewer reportViewer;
+
+ private readonly ILogger _logger;
+
+ private readonly IReportLogic _logic;
+
+ public FormReportOrdersByDate(ILogger logger, IReportLogic logic)
+ {
+ InitializeComponent();
+ _logger = logger;
+ _logic = logic;
+ reportViewer = new ReportViewer
+ {
+ Dock = DockStyle.Fill
+ };
+ reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrdersByDate.rdlc", FileMode.Open));
+ Controls.Clear();
+ Controls.Add(reportViewer);
+ Controls.Add(panel);
+ }
+
+ private void ButtonMake_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ var dataSource = _logic.GetOrdersByDate();
+ var source = new ReportDataSource("DataSetOrders", dataSource);
+ reportViewer.LocalReport.DataSources.Clear();
+ reportViewer.LocalReport.DataSources.Add(source);
+
+ reportViewer.RefreshReport();
+ _logger.LogInformation("Загрузка списка заказов на весь период");
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "Ошибка загрузки списка заказов на период");
+ MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void ButtonToPdf_Click(object sender, EventArgs e)
+ {
+ using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" };
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ try
+ {
+ _logic.SaveOrdersByDateToPdfFile(new ReportBindingModel
+ {
+ FileName = dialog.FileName
+ });
+ _logger.LogInformation("Сохранение списка заказов за весь период");
+ MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "Ошибка сохранения списка заказов на период");
+ MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+ }
+ }
+}
diff --git a/PrecastConcretePlant/FormReportOrdersByDate.resx b/PrecastConcretePlant/FormReportOrdersByDate.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/PrecastConcretePlant/FormReportOrdersByDate.resx
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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/PrecastConcretePlant/FormReportShopReinforceds.Designer.cs b/PrecastConcretePlant/FormReportShopReinforceds.Designer.cs
new file mode 100644
index 0000000..f59e3be
--- /dev/null
+++ b/PrecastConcretePlant/FormReportShopReinforceds.Designer.cs
@@ -0,0 +1,107 @@
+namespace PrecastConcretePlantView
+{
+ partial class FormReportShopReinforceds
+ {
+ ///
+ /// 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()
+ {
+ buttonSaveToExcel = new Button();
+ dataGridView = new DataGridView();
+ ColumnShop = new DataGridViewTextBoxColumn();
+ ColumnReinforced = new DataGridViewTextBoxColumn();
+ ColumnCount = new DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
+ SuspendLayout();
+ //
+ // buttonSaveToExcel
+ //
+ buttonSaveToExcel.Location = new Point(8, 7);
+ buttonSaveToExcel.Margin = new Padding(2);
+ buttonSaveToExcel.Name = "buttonSaveToExcel";
+ buttonSaveToExcel.Size = new Size(147, 20);
+ buttonSaveToExcel.TabIndex = 0;
+ buttonSaveToExcel.Text = "Сохранить в Excel";
+ buttonSaveToExcel.UseVisualStyleBackColor = true;
+ buttonSaveToExcel.Click += ButtonSaveToExcel_Click;
+ //
+ // dataGridView
+ //
+ dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ dataGridView.Columns.AddRange(new DataGridViewColumn[] { ColumnShop, ColumnReinforced, ColumnCount });
+ dataGridView.Dock = DockStyle.Bottom;
+ dataGridView.Location = new Point(0, 38);
+ dataGridView.Margin = new Padding(2);
+ dataGridView.Name = "dataGridView";
+ dataGridView.RowHeadersWidth = 62;
+ dataGridView.RowTemplate.Height = 33;
+ dataGridView.Size = new Size(560, 232);
+ dataGridView.TabIndex = 1;
+ //
+ // ColumnShop
+ //
+ ColumnShop.HeaderText = "Магазин";
+ ColumnShop.MinimumWidth = 8;
+ ColumnShop.Name = "ColumnShop";
+ ColumnShop.Width = 150;
+ //
+ // ColumnReinforced
+ //
+ ColumnReinforced.HeaderText = "ЖБИ";
+ ColumnReinforced.MinimumWidth = 8;
+ ColumnReinforced.Name = "ColumnReinforced";
+ ColumnReinforced.Width = 150;
+ //
+ // ColumnCount
+ //
+ ColumnCount.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
+ ColumnCount.HeaderText = "Количество";
+ ColumnCount.MinimumWidth = 8;
+ ColumnCount.Name = "ColumnCount";
+ //
+ // FormReportShopReinforceds
+ //
+ AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(560, 270);
+ Controls.Add(dataGridView);
+ Controls.Add(buttonSaveToExcel);
+ Margin = new Padding(2);
+ Name = "FormReportShopReinforceds";
+ Text = "Загруженность магазинов";
+ Load += FormReportShopReinforceds_Load;
+ ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
+ ResumeLayout(false);
+ }
+
+ #endregion
+
+ private Button buttonSaveToExcel;
+ private DataGridView dataGridView;
+ private DataGridViewTextBoxColumn ColumnShop;
+ private DataGridViewTextBoxColumn ColumnReinforced;
+ private DataGridViewTextBoxColumn ColumnCount;
+ }
+}
\ No newline at end of file
diff --git a/PrecastConcretePlant/FormReportShopReinforceds.cs b/PrecastConcretePlant/FormReportShopReinforceds.cs
new file mode 100644
index 0000000..6285970
--- /dev/null
+++ b/PrecastConcretePlant/FormReportShopReinforceds.cs
@@ -0,0 +1,79 @@
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace PrecastConcretePlantView
+{
+ public partial class FormReportShopReinforceds : Form
+ {
+ private readonly ILogger _logger;
+ private readonly IReportLogic _logic;
+ public FormReportShopReinforceds(ILogger logger, IReportLogic logic)
+ {
+ InitializeComponent();
+ _logger = logger;
+ _logic = logic;
+ }
+ private void FormReportShopReinforceds_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ var dict = _logic.GetShopReinforced();
+ if (dict != null)
+ {
+ dataGridView.Rows.Clear();
+ foreach (var elem in dict)
+ {
+ dataGridView.Rows.Add(new object[] { elem.ShopName, "", "" });
+ foreach (var listElem in elem.Reinforceds)
+ {
+ dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
+ }
+ dataGridView.Rows.Add(new object[] { "Итого", "", elem.TotalCount });
+ dataGridView.Rows.Add(Array.Empty