улр4
This commit is contained in:
parent
d0ed969123
commit
745fe2b41e
328
PrecastConcretePlant/FormMain.Designer.cs
generated
328
PrecastConcretePlant/FormMain.Designer.cs
generated
@ -28,203 +28,218 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.MenuStrip = new System.Windows.Forms.MenuStrip();
|
MenuStrip = new MenuStrip();
|
||||||
this.СправочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
СправочникиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.ИзделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
ИзделияToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.КомпонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
КомпонентыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
магазиныToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.списокЖБИToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
списокЖБИToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
компонентыПоИзделиямToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.DataGridView = new System.Windows.Forms.DataGridView();
|
DataGridView = new DataGridView();
|
||||||
this.CreateOrderButton = new System.Windows.Forms.Button();
|
CreateOrderButton = new Button();
|
||||||
this.TakeOrderInWorkButton = new System.Windows.Forms.Button();
|
TakeOrderInWorkButton = new Button();
|
||||||
this.OrderReadyButton = new System.Windows.Forms.Button();
|
OrderReadyButton = new Button();
|
||||||
this.IssuedOrderButton = new System.Windows.Forms.Button();
|
IssuedOrderButton = new Button();
|
||||||
this.UpdateListButton = new System.Windows.Forms.Button();
|
UpdateListButton = new Button();
|
||||||
this.AddShopButton = new System.Windows.Forms.Button();
|
AddShopButton = new Button();
|
||||||
this.ButtonSell = new System.Windows.Forms.Button();
|
ButtonSell = new Button();
|
||||||
this.MenuStrip.SuspendLayout();
|
списокМагазиновToolStripMenuItem = new ToolStripMenuItem();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit();
|
загруженностьМагазиновToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.SuspendLayout();
|
заказыПоДатамToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
MenuStrip.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)DataGridView).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// MenuStrip
|
// MenuStrip
|
||||||
//
|
//
|
||||||
this.MenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
MenuStrip.Items.AddRange(new ToolStripItem[] { СправочникиToolStripMenuItem, отчетыToolStripMenuItem });
|
||||||
this.СправочникиToolStripMenuItem,
|
MenuStrip.Location = new Point(0, 0);
|
||||||
this.отчетыToolStripMenuItem});
|
MenuStrip.Name = "MenuStrip";
|
||||||
this.MenuStrip.Location = new System.Drawing.Point(0, 0);
|
MenuStrip.Size = new Size(953, 24);
|
||||||
this.MenuStrip.Name = "MenuStrip";
|
MenuStrip.TabIndex = 0;
|
||||||
this.MenuStrip.Size = new System.Drawing.Size(953, 24);
|
MenuStrip.Text = "menuStrip1";
|
||||||
this.MenuStrip.TabIndex = 0;
|
|
||||||
this.MenuStrip.Text = "menuStrip1";
|
|
||||||
//
|
//
|
||||||
// СправочникиToolStripMenuItem
|
// СправочникиToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.СправочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
СправочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ИзделияToolStripMenuItem, КомпонентыToolStripMenuItem, магазиныToolStripMenuItem });
|
||||||
this.ИзделияToolStripMenuItem,
|
СправочникиToolStripMenuItem.Name = "СправочникиToolStripMenuItem";
|
||||||
this.КомпонентыToolStripMenuItem,
|
СправочникиToolStripMenuItem.Size = new Size(94, 20);
|
||||||
this.магазиныToolStripMenuItem});
|
СправочникиToolStripMenuItem.Text = "Cправочники";
|
||||||
this.СправочникиToolStripMenuItem.Name = "СправочникиToolStripMenuItem";
|
|
||||||
this.СправочникиToolStripMenuItem.Size = new System.Drawing.Size(94, 20);
|
|
||||||
this.СправочникиToolStripMenuItem.Text = "Cправочники";
|
|
||||||
//
|
//
|
||||||
// ИзделияToolStripMenuItem
|
// ИзделияToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.ИзделияToolStripMenuItem.Name = "ИзделияToolStripMenuItem";
|
ИзделияToolStripMenuItem.Name = "ИзделияToolStripMenuItem";
|
||||||
this.ИзделияToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
ИзделияToolStripMenuItem.Size = new Size(145, 22);
|
||||||
this.ИзделияToolStripMenuItem.Text = "ЖБИ";
|
ИзделияToolStripMenuItem.Text = "ЖБИ";
|
||||||
this.ИзделияToolStripMenuItem.Click += new System.EventHandler(this.ИзделияToolStripMenuItem_Click);
|
ИзделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// КомпонентыToolStripMenuItem
|
// КомпонентыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem";
|
КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem";
|
||||||
this.КомпонентыToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
КомпонентыToolStripMenuItem.Size = new Size(145, 22);
|
||||||
this.КомпонентыToolStripMenuItem.Text = "Компоненты";
|
КомпонентыToolStripMenuItem.Text = "Компоненты";
|
||||||
this.КомпонентыToolStripMenuItem.Click += new System.EventHandler(this.КомпонентыToolStripMenuItem_Click);
|
КомпонентыToolStripMenuItem.Click += Компоненты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
|
// магазиныToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||||
this.магазиныToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
магазиныToolStripMenuItem.Size = new Size(145, 22);
|
||||||
this.магазиныToolStripMenuItem.Text = "Магазины";
|
магазиныToolStripMenuItem.Text = "Магазины";
|
||||||
this.магазиныToolStripMenuItem.Click += new System.EventHandler(this.магазиныToolStripMenuItem_Click);
|
магазины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
|
// DataGridView
|
||||||
//
|
//
|
||||||
this.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.DataGridView.Location = new System.Drawing.Point(0, 27);
|
DataGridView.Location = new Point(0, 27);
|
||||||
this.DataGridView.Name = "DataGridView";
|
DataGridView.Name = "DataGridView";
|
||||||
this.DataGridView.RowTemplate.Height = 25;
|
DataGridView.RowTemplate.Height = 25;
|
||||||
this.DataGridView.Size = new System.Drawing.Size(805, 421);
|
DataGridView.Size = new Size(805, 421);
|
||||||
this.DataGridView.TabIndex = 1;
|
DataGridView.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// CreateOrderButton
|
// CreateOrderButton
|
||||||
//
|
//
|
||||||
this.CreateOrderButton.Location = new System.Drawing.Point(825, 27);
|
CreateOrderButton.Location = new Point(825, 27);
|
||||||
this.CreateOrderButton.Name = "CreateOrderButton";
|
CreateOrderButton.Name = "CreateOrderButton";
|
||||||
this.CreateOrderButton.Size = new System.Drawing.Size(104, 33);
|
CreateOrderButton.Size = new Size(104, 33);
|
||||||
this.CreateOrderButton.TabIndex = 2;
|
CreateOrderButton.TabIndex = 2;
|
||||||
this.CreateOrderButton.Text = "Создать заказ";
|
CreateOrderButton.Text = "Создать заказ";
|
||||||
this.CreateOrderButton.UseVisualStyleBackColor = true;
|
CreateOrderButton.UseVisualStyleBackColor = true;
|
||||||
this.CreateOrderButton.Click += new System.EventHandler(this.CreateOrderButton_Click);
|
CreateOrderButton.Click += CreateOrderButton_Click;
|
||||||
//
|
//
|
||||||
// TakeOrderInWorkButton
|
// TakeOrderInWorkButton
|
||||||
//
|
//
|
||||||
this.TakeOrderInWorkButton.Location = new System.Drawing.Point(825, 66);
|
TakeOrderInWorkButton.Location = new Point(825, 66);
|
||||||
this.TakeOrderInWorkButton.Name = "TakeOrderInWorkButton";
|
TakeOrderInWorkButton.Name = "TakeOrderInWorkButton";
|
||||||
this.TakeOrderInWorkButton.Size = new System.Drawing.Size(104, 39);
|
TakeOrderInWorkButton.Size = new Size(104, 39);
|
||||||
this.TakeOrderInWorkButton.TabIndex = 3;
|
TakeOrderInWorkButton.TabIndex = 3;
|
||||||
this.TakeOrderInWorkButton.Text = "Отдать на выполнение";
|
TakeOrderInWorkButton.Text = "Отдать на выполнение";
|
||||||
this.TakeOrderInWorkButton.UseVisualStyleBackColor = true;
|
TakeOrderInWorkButton.UseVisualStyleBackColor = true;
|
||||||
this.TakeOrderInWorkButton.Click += new System.EventHandler(this.TakeOrderInWorkButton_Click);
|
TakeOrderInWorkButton.Click += TakeOrderInWorkButton_Click;
|
||||||
//
|
//
|
||||||
// OrderReadyButton
|
// OrderReadyButton
|
||||||
//
|
//
|
||||||
this.OrderReadyButton.Location = new System.Drawing.Point(825, 111);
|
OrderReadyButton.Location = new Point(825, 111);
|
||||||
this.OrderReadyButton.Name = "OrderReadyButton";
|
OrderReadyButton.Name = "OrderReadyButton";
|
||||||
this.OrderReadyButton.Size = new System.Drawing.Size(104, 33);
|
OrderReadyButton.Size = new Size(104, 33);
|
||||||
this.OrderReadyButton.TabIndex = 4;
|
OrderReadyButton.TabIndex = 4;
|
||||||
this.OrderReadyButton.Text = "Заказ готов";
|
OrderReadyButton.Text = "Заказ готов";
|
||||||
this.OrderReadyButton.UseVisualStyleBackColor = true;
|
OrderReadyButton.UseVisualStyleBackColor = true;
|
||||||
this.OrderReadyButton.Click += new System.EventHandler(this.OrderReadyButton_Click);
|
OrderReadyButton.Click += OrderReadyButton_Click;
|
||||||
//
|
//
|
||||||
// IssuedOrderButton
|
// IssuedOrderButton
|
||||||
//
|
//
|
||||||
this.IssuedOrderButton.Location = new System.Drawing.Point(825, 150);
|
IssuedOrderButton.Location = new Point(825, 150);
|
||||||
this.IssuedOrderButton.Name = "IssuedOrderButton";
|
IssuedOrderButton.Name = "IssuedOrderButton";
|
||||||
this.IssuedOrderButton.Size = new System.Drawing.Size(104, 33);
|
IssuedOrderButton.Size = new Size(104, 33);
|
||||||
this.IssuedOrderButton.TabIndex = 5;
|
IssuedOrderButton.TabIndex = 5;
|
||||||
this.IssuedOrderButton.Text = "Заказ выдан";
|
IssuedOrderButton.Text = "Заказ выдан";
|
||||||
this.IssuedOrderButton.UseVisualStyleBackColor = true;
|
IssuedOrderButton.UseVisualStyleBackColor = true;
|
||||||
this.IssuedOrderButton.Click += new System.EventHandler(this.IssuedOrderButton_Click);
|
IssuedOrderButton.Click += IssuedOrderButton_Click;
|
||||||
//
|
//
|
||||||
// UpdateListButton
|
// UpdateListButton
|
||||||
//
|
//
|
||||||
this.UpdateListButton.Location = new System.Drawing.Point(825, 189);
|
UpdateListButton.Location = new Point(825, 189);
|
||||||
this.UpdateListButton.Name = "UpdateListButton";
|
UpdateListButton.Name = "UpdateListButton";
|
||||||
this.UpdateListButton.Size = new System.Drawing.Size(104, 33);
|
UpdateListButton.Size = new Size(104, 33);
|
||||||
this.UpdateListButton.TabIndex = 6;
|
UpdateListButton.TabIndex = 6;
|
||||||
this.UpdateListButton.Text = "Обновить список";
|
UpdateListButton.Text = "Обновить список";
|
||||||
this.UpdateListButton.UseVisualStyleBackColor = true;
|
UpdateListButton.UseVisualStyleBackColor = true;
|
||||||
this.UpdateListButton.Click += new System.EventHandler(this.UpdateListButton_Click);
|
UpdateListButton.Click += UpdateListButton_Click;
|
||||||
//
|
//
|
||||||
// AddShopButton
|
// AddShopButton
|
||||||
//
|
//
|
||||||
this.AddShopButton.Location = new System.Drawing.Point(825, 228);
|
AddShopButton.Location = new Point(825, 228);
|
||||||
this.AddShopButton.Name = "AddShopButton";
|
AddShopButton.Name = "AddShopButton";
|
||||||
this.AddShopButton.Size = new System.Drawing.Size(104, 38);
|
AddShopButton.Size = new Size(104, 38);
|
||||||
this.AddShopButton.TabIndex = 7;
|
AddShopButton.TabIndex = 7;
|
||||||
this.AddShopButton.Text = "Добавить в магазин";
|
AddShopButton.Text = "Добавить в магазин";
|
||||||
this.AddShopButton.UseVisualStyleBackColor = true;
|
AddShopButton.UseVisualStyleBackColor = true;
|
||||||
this.AddShopButton.Click += new System.EventHandler(this.AddShopButton_Click);
|
AddShopButton.Click += AddShopButton_Click;
|
||||||
//
|
//
|
||||||
// ButtonSell
|
// ButtonSell
|
||||||
//
|
//
|
||||||
this.ButtonSell.Location = new System.Drawing.Point(825, 272);
|
ButtonSell.Location = new Point(825, 272);
|
||||||
this.ButtonSell.Name = "ButtonSell";
|
ButtonSell.Name = "ButtonSell";
|
||||||
this.ButtonSell.Size = new System.Drawing.Size(104, 38);
|
ButtonSell.Size = new Size(104, 38);
|
||||||
this.ButtonSell.TabIndex = 8;
|
ButtonSell.TabIndex = 8;
|
||||||
this.ButtonSell.Text = "Продать";
|
ButtonSell.Text = "Продать";
|
||||||
this.ButtonSell.UseVisualStyleBackColor = true;
|
ButtonSell.UseVisualStyleBackColor = true;
|
||||||
this.ButtonSell.Click += new System.EventHandler(this.ButtonSell_Click);
|
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
|
// FormMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(953, 450);
|
ClientSize = new Size(953, 450);
|
||||||
this.Controls.Add(this.ButtonSell);
|
Controls.Add(ButtonSell);
|
||||||
this.Controls.Add(this.AddShopButton);
|
Controls.Add(AddShopButton);
|
||||||
this.Controls.Add(this.UpdateListButton);
|
Controls.Add(UpdateListButton);
|
||||||
this.Controls.Add(this.IssuedOrderButton);
|
Controls.Add(IssuedOrderButton);
|
||||||
this.Controls.Add(this.OrderReadyButton);
|
Controls.Add(OrderReadyButton);
|
||||||
this.Controls.Add(this.TakeOrderInWorkButton);
|
Controls.Add(TakeOrderInWorkButton);
|
||||||
this.Controls.Add(this.CreateOrderButton);
|
Controls.Add(CreateOrderButton);
|
||||||
this.Controls.Add(this.DataGridView);
|
Controls.Add(DataGridView);
|
||||||
this.Controls.Add(this.MenuStrip);
|
Controls.Add(MenuStrip);
|
||||||
this.MainMenuStrip = this.MenuStrip;
|
MainMenuStrip = MenuStrip;
|
||||||
this.Name = "FormMain";
|
Name = "FormMain";
|
||||||
this.Text = "Завод ЖБИ";
|
Text = "Завод ЖБИ";
|
||||||
this.Load += new System.EventHandler(this.FormMain_Load);
|
Load += FormMain_Load;
|
||||||
this.MenuStrip.ResumeLayout(false);
|
MenuStrip.ResumeLayout(false);
|
||||||
this.MenuStrip.PerformLayout();
|
MenuStrip.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.DataGridView)).EndInit();
|
((System.ComponentModel.ISupportInitialize)DataGridView).EndInit();
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -246,5 +261,8 @@
|
|||||||
private ToolStripMenuItem магазиныToolStripMenuItem;
|
private ToolStripMenuItem магазиныToolStripMenuItem;
|
||||||
private Button AddShopButton;
|
private Button AddShopButton;
|
||||||
private Button ButtonSell;
|
private Button ButtonSell;
|
||||||
|
private ToolStripMenuItem списокМагазиновToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem загруженностьМагазиновToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem заказыПоДатамToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -238,5 +238,33 @@ namespace PrecastConcretePlantView
|
|||||||
LoadData();
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
85
PrecastConcretePlant/FormReportOrdersByDate.Designer.cs
generated
Normal file
85
PrecastConcretePlant/FormReportOrdersByDate.Designer.cs
generated
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
namespace PrecastConcretePlantView
|
||||||
|
{
|
||||||
|
partial class FormReportOrdersByDate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
79
PrecastConcretePlant/FormReportOrdersByDate.cs
Normal file
79
PrecastConcretePlant/FormReportOrdersByDate.cs
Normal file
@ -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<FormReportOrders> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
PrecastConcretePlant/FormReportOrdersByDate.resx
Normal file
60
PrecastConcretePlant/FormReportOrdersByDate.resx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<root>
|
||||||
|
<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>
|
107
PrecastConcretePlant/FormReportShopReinforceds.Designer.cs
generated
Normal file
107
PrecastConcretePlant/FormReportShopReinforceds.Designer.cs
generated
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
namespace PrecastConcretePlantView
|
||||||
|
{
|
||||||
|
partial class FormReportShopReinforceds
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
79
PrecastConcretePlant/FormReportShopReinforceds.cs
Normal file
79
PrecastConcretePlant/FormReportShopReinforceds.cs
Normal file
@ -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<FormReportShopReinforceds> 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<object>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_logger.LogInformation("Загрузка списка магазинов с ЖБИ");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки списка магазинов с ЖБИ");
|
||||||
|
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ButtonSaveToExcel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using var dialog = new SaveFileDialog
|
||||||
|
{
|
||||||
|
Filter = "xlsx|*.xlsx"
|
||||||
|
};
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logic.SaveShopReinforcedToExcelFile(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
PrecastConcretePlant/FormReportShopReinforceds.resx
Normal file
60
PrecastConcretePlant/FormReportShopReinforceds.resx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<root>
|
||||||
|
<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>
|
@ -62,6 +62,8 @@ namespace PrecastConcretePlant
|
|||||||
services.AddTransient<FormShops>();
|
services.AddTransient<FormShops>();
|
||||||
services.AddTransient<FormShop>();
|
services.AddTransient<FormShop>();
|
||||||
services.AddTransient<FormSellReinforced>();
|
services.AddTransient<FormSellReinforced>();
|
||||||
|
services.AddTransient<FormReportOrdersByDate>();
|
||||||
|
services.AddTransient<FormReportShopReinforceds>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
404
PrecastConcretePlant/ReportOrdersByDate.rdlc
Normal file
404
PrecastConcretePlant/ReportOrdersByDate.rdlc
Normal file
@ -0,0 +1,404 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||||
|
<Body>
|
||||||
|
<ReportItems>
|
||||||
|
<Textbox Name="Textbox1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Заказы</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>16pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||||
|
<Height>0.89986cm</Height>
|
||||||
|
<Width>11.67694cm</Width>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<VerticalAlign>Middle</VerticalAlign>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Tablix Name="Tablix1">
|
||||||
|
<TablixBody>
|
||||||
|
<TablixColumns>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>3.81116cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>3.5551cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>3.72296cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
</TablixColumns>
|
||||||
|
<TablixRows>
|
||||||
|
<TablixRow>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<TablixCells>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox2">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Дата создания</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox4">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Количество</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox6">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Сумма</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
</TablixCells>
|
||||||
|
</TablixRow>
|
||||||
|
<TablixRow>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<TablixCells>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="DateCreate">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!DateCreate.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<Format>d</Format>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>DateCreate</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Count">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Count.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Count</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Sum">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Sum.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Sum</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
</TablixCells>
|
||||||
|
</TablixRow>
|
||||||
|
</TablixRows>
|
||||||
|
</TablixBody>
|
||||||
|
<TablixColumnHierarchy>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
</TablixMembers>
|
||||||
|
</TablixColumnHierarchy>
|
||||||
|
<TablixRowHierarchy>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember>
|
||||||
|
<KeepWithGroup>After</KeepWithGroup>
|
||||||
|
</TablixMember>
|
||||||
|
<TablixMember>
|
||||||
|
<Group Name="Подробности" />
|
||||||
|
</TablixMember>
|
||||||
|
</TablixMembers>
|
||||||
|
</TablixRowHierarchy>
|
||||||
|
<DataSetName>DataSetOrders</DataSetName>
|
||||||
|
<Top>1.07625cm</Top>
|
||||||
|
<Left>0.30551cm</Left>
|
||||||
|
<Height>1.2cm</Height>
|
||||||
|
<Width>11.08922cm</Width>
|
||||||
|
<ZIndex>1</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</Tablix>
|
||||||
|
<Textbox Name="Textbox12">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Итого:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||||
|
<Top>2.73389cm</Top>
|
||||||
|
<Left>5.43634cm</Left>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<Width>2.23542cm</Width>
|
||||||
|
<ZIndex>2</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<VerticalAlign>Middle</VerticalAlign>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox11">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Sum(Fields!Sum.Value, "DataSetOrders")</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||||
|
<Top>2.73389cm</Top>
|
||||||
|
<Left>7.67176cm</Left>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<Width>3.72296cm</Width>
|
||||||
|
<ZIndex>3</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</ReportItems>
|
||||||
|
<Height>1.55556in</Height>
|
||||||
|
<Style />
|
||||||
|
</Body>
|
||||||
|
<Width>4.59722in</Width>
|
||||||
|
<Page>
|
||||||
|
<PageHeight>29.7cm</PageHeight>
|
||||||
|
<PageWidth>21cm</PageWidth>
|
||||||
|
<LeftMargin>2cm</LeftMargin>
|
||||||
|
<RightMargin>2cm</RightMargin>
|
||||||
|
<TopMargin>2cm</TopMargin>
|
||||||
|
<BottomMargin>2cm</BottomMargin>
|
||||||
|
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||||
|
<Style />
|
||||||
|
</Page>
|
||||||
|
<AutoRefresh>0</AutoRefresh>
|
||||||
|
<DataSources>
|
||||||
|
<DataSource Name="PrecastConcretePlantViewModels">
|
||||||
|
<ConnectionProperties>
|
||||||
|
<DataProvider>System.Data.DataSet</DataProvider>
|
||||||
|
<ConnectString>/* Local Connection */</ConnectString>
|
||||||
|
</ConnectionProperties>
|
||||||
|
<rd:DataSourceID>238af19e-9b0c-4e28-adb3-e1d783e7fdff</rd:DataSourceID>
|
||||||
|
</DataSource>
|
||||||
|
</DataSources>
|
||||||
|
<DataSets>
|
||||||
|
<DataSet Name="DataSetOrders">
|
||||||
|
<Query>
|
||||||
|
<DataSourceName>PrecastConcretePlantViewModels</DataSourceName>
|
||||||
|
<CommandText>/* Local Query */</CommandText>
|
||||||
|
</Query>
|
||||||
|
<Fields>
|
||||||
|
<Field Name="DateCreate">
|
||||||
|
<DataField>DateCreate</DataField>
|
||||||
|
<rd:TypeName>System.DateTime</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Count">
|
||||||
|
<DataField>Count</DataField>
|
||||||
|
<rd:TypeName>System.Int32</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Sum">
|
||||||
|
<DataField>Sum</DataField>
|
||||||
|
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
</Fields>
|
||||||
|
<rd:DataSetInfo>
|
||||||
|
<rd:DataSetName>PrecastConcretePlantContracts.ViewModels</rd:DataSetName>
|
||||||
|
<rd:TableName>ReportOrdersViewModel</rd:TableName>
|
||||||
|
<rd:ObjectDataSourceType>PrecastConcretePlantContracts.ViewModels.ReportOrdersByDateViewModel, PrecastConcretePlantContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
|
||||||
|
</rd:DataSetInfo>
|
||||||
|
</DataSet>
|
||||||
|
</DataSets>
|
||||||
|
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||||
|
<rd:ReportID>eea72620-f270-4155-a203-6e9706fa3bf1</rd:ReportID>
|
||||||
|
</Report>
|
@ -116,5 +116,66 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
|||||||
Orders = GetOrders(model)
|
Orders = GetOrders(model)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
public List<ReportShopReinforcedViewModel> GetShopReinforced()
|
||||||
|
{
|
||||||
|
var shops = _shopStorage.GetFullList();
|
||||||
|
var list = new List<ReportShopReinforcedViewModel>();
|
||||||
|
|
||||||
|
foreach (var shop in shops)
|
||||||
|
{
|
||||||
|
var record = new ReportShopReinforcedViewModel
|
||||||
|
{
|
||||||
|
ShopName = shop.ShopName,
|
||||||
|
Reinforceds = new List<(string, int)>(),
|
||||||
|
TotalCount = 0
|
||||||
|
};
|
||||||
|
foreach (var reinforced in shop.ShopReinforceds)
|
||||||
|
{
|
||||||
|
record.Reinforceds.Add(new(reinforced.Value.Item1.ReinforcedName, reinforced.Value.Item2));
|
||||||
|
record.TotalCount += reinforced.Value.Item2;
|
||||||
|
}
|
||||||
|
list.Add(record);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
public List<ReportOrdersByDateViewModel> GetOrdersByDate()
|
||||||
|
{
|
||||||
|
return _orderStorage.GetFullList()
|
||||||
|
.GroupBy(x => x.DateCreate.Date)
|
||||||
|
.Select(x => new ReportOrdersByDateViewModel
|
||||||
|
{
|
||||||
|
DateCreate = x.Key,
|
||||||
|
Count = x.Count(),
|
||||||
|
Sum = x.Sum(x => x.Sum)
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
public void SaveShopsToWordFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
_saveToWord.CreateDocShopTable(new WordInfoShopTable
|
||||||
|
{
|
||||||
|
FileName = model.FileName,
|
||||||
|
Title = "Список магазинов",
|
||||||
|
Shops = _shopStorage.GetFullList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public void SaveShopReinforcedToExcelFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
_saveToExcel.CreateShopReport(new ExcelInfo
|
||||||
|
{
|
||||||
|
FileName = model.FileName,
|
||||||
|
Title = "Список магазинов",
|
||||||
|
ShopTravels = GetShopReinforced()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public void SaveOrdersByDateToPdfFile(ReportBindingModel model)
|
||||||
|
{
|
||||||
|
_saveToPdf.CreateDocOrdersByDate(new PdfInfoOrdersByDate
|
||||||
|
{
|
||||||
|
FileName = model.FileName,
|
||||||
|
Title = "Список заказов",
|
||||||
|
Orders = GetOrdersByDate()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,68 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
|||||||
}
|
}
|
||||||
SaveExcel(info);
|
SaveExcel(info);
|
||||||
}
|
}
|
||||||
|
public void CreateShopReport(ExcelInfo info)
|
||||||
|
{
|
||||||
|
CreateExcel(new ExcelInfo() { FileName = info.FileName });
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "A",
|
||||||
|
RowIndex = 1,
|
||||||
|
Text = info.Title,
|
||||||
|
StyleInfo = ExcelStyleInfoType.Title
|
||||||
|
});
|
||||||
|
MergeCells(new ExcelMergeParameters
|
||||||
|
{
|
||||||
|
CellFromName = "A1",
|
||||||
|
CellToName = "C1"
|
||||||
|
});
|
||||||
|
uint rowIndex = 2;
|
||||||
|
foreach (var st in info.ShopReinforceds)
|
||||||
|
{
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "A",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = st.ShopName,
|
||||||
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
|
});
|
||||||
|
rowIndex++;
|
||||||
|
foreach (var reinforced in st.Reinforceds)
|
||||||
|
{
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "B",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = reinforced.Item1,
|
||||||
|
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||||
|
});
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "C",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = reinforced.Item2.ToString(),
|
||||||
|
StyleInfo = ExcelStyleInfoType.TextWithBorder
|
||||||
|
});
|
||||||
|
rowIndex++;
|
||||||
|
}
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "A",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = "Итого",
|
||||||
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
|
});
|
||||||
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
|
{
|
||||||
|
ColumnName = "C",
|
||||||
|
RowIndex = rowIndex,
|
||||||
|
Text = st.TotalCount.ToString(),
|
||||||
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
|
});
|
||||||
|
rowIndex++;
|
||||||
|
}
|
||||||
|
SaveExcel(new ExcelInfo() { FileName = info.FileName });
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание excel-файла
|
/// Создание excel-файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -41,6 +41,36 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
|||||||
});
|
});
|
||||||
SavePdf(info);
|
SavePdf(info);
|
||||||
}
|
}
|
||||||
|
public void CreateDocOrdersByDate(PdfInfoOrdersByDate info)
|
||||||
|
{
|
||||||
|
CreatePdf(new PdfInfo() { FileName = info.FileName });
|
||||||
|
CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center });
|
||||||
|
|
||||||
|
CreateTable(new List<string> { "5cm", "4cm", "4cm" });
|
||||||
|
|
||||||
|
CreateRow(new PdfRowParameters
|
||||||
|
{
|
||||||
|
Texts = new List<string> { "Дата", "Количество", "Сумма" },
|
||||||
|
Style = "NormalTitle",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
|
});
|
||||||
|
foreach (var order in info.Orders)
|
||||||
|
{
|
||||||
|
CreateRow(new PdfRowParameters
|
||||||
|
{
|
||||||
|
Texts = new List<string> { order.DateCreate.ToShortDateString(), order.Count.ToString(), order.Sum.ToString() },
|
||||||
|
Style = "Normal",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||||
|
});
|
||||||
|
}
|
||||||
|
CreateParagraph(new PdfParagraph
|
||||||
|
{
|
||||||
|
Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t",
|
||||||
|
Style = "Normal",
|
||||||
|
ParagraphAlignment = PdfParagraphAlignmentType.Rigth
|
||||||
|
});
|
||||||
|
SavePdf(new PdfInfo() { FileName = info.FileName });
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание doc-файла
|
/// Создание doc-файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -37,6 +37,33 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
|||||||
}
|
}
|
||||||
SaveWord(info);
|
SaveWord(info);
|
||||||
}
|
}
|
||||||
|
public void CreateDocShopTable(WordInfoShopTable info)
|
||||||
|
{
|
||||||
|
CreateWord(new() { FileName = info.FileName });
|
||||||
|
CreateParagraph(new WordParagraph
|
||||||
|
{
|
||||||
|
Texts = new List<(string, WordTextProperties)> { (info.Title, new WordTextProperties { Bold = true, Size = "24", }) },
|
||||||
|
TextProperties = new WordTextProperties
|
||||||
|
{
|
||||||
|
Size = "24",
|
||||||
|
JustificationType = WordJustificationType.Center
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
CreateTable(new()
|
||||||
|
{
|
||||||
|
Columns = new() { ("Название", 3000), ("Дата открытия", 3000), ("Адрес", 3000) },
|
||||||
|
Rows = info.Shops.Select(x => new List<string>
|
||||||
|
{
|
||||||
|
x.ShopName,
|
||||||
|
Convert.ToString(x.DateOpening),
|
||||||
|
x.Address,
|
||||||
|
})
|
||||||
|
.ToList()
|
||||||
|
});
|
||||||
|
|
||||||
|
SaveWord(new() { FileName = info.FileName });
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создание doc-файла
|
/// Создание doc-файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -48,6 +75,7 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage
|
|||||||
/// <param name="paragraph"></param>
|
/// <param name="paragraph"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected abstract void CreateParagraph(WordParagraph paragraph);
|
protected abstract void CreateParagraph(WordParagraph paragraph);
|
||||||
|
protected abstract void CreateTable(WordTable table);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Сохранение файла
|
/// Сохранение файла
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
using PrecastConcretePlantContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||||
|
{
|
||||||
|
public class ExcelInfoShop
|
||||||
|
{
|
||||||
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
public string Title { get; set; } = string.Empty;
|
||||||
|
public List<ReportShopReinforcedViewModel> ShopReinforceds
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using PrecastConcretePlantContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||||
|
{
|
||||||
|
public class PdfInfoOrdersByDate
|
||||||
|
{
|
||||||
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<ReportOrdersByDateViewModel> Orders { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using PrecastConcretePlantContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||||
|
{
|
||||||
|
public class WordInfoShopTable
|
||||||
|
{
|
||||||
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<ShopViewModel> Shops { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PrecastConcretePlantBusinessLogic.OfficePackage.HelperModels
|
||||||
|
{
|
||||||
|
public class WordTable
|
||||||
|
{
|
||||||
|
public List<(string, int)> Columns { get; set; } = new();
|
||||||
|
public List<List<string>> Rows { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -113,5 +113,39 @@ namespace PrecastConcretePlantBusinessLogic.OfficePackage.Implements
|
|||||||
_wordDocument.MainDocumentPart!.Document.Save();
|
_wordDocument.MainDocumentPart!.Document.Save();
|
||||||
_wordDocument.Close();
|
_wordDocument.Close();
|
||||||
}
|
}
|
||||||
|
private static TableCell CreateTableCell(string text, int? cellWidth = null)
|
||||||
|
{
|
||||||
|
TableCell tableCell = new(new Paragraph(new Run(new Text(text))));
|
||||||
|
tableCell.Append(new TableCellProperties()
|
||||||
|
{
|
||||||
|
TableCellWidth = new() { Width = cellWidth.ToString() }
|
||||||
|
});
|
||||||
|
return tableCell;
|
||||||
|
}
|
||||||
|
protected override void CreateTable(WordTable table)
|
||||||
|
{
|
||||||
|
if (_docBody == null || table == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var docTable = new Table();
|
||||||
|
|
||||||
|
TableProperties tableProperties = new(
|
||||||
|
new TableBorders(
|
||||||
|
new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||||
|
new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||||
|
new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||||
|
new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||||
|
new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 },
|
||||||
|
new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.BasicBlackDashes), Size = 3 }
|
||||||
|
)
|
||||||
|
);
|
||||||
|
docTable.AppendChild(tableProperties);
|
||||||
|
|
||||||
|
docTable.Append(new TableRow(table.Columns.Select(x => CreateTableCell(x.Item1, x.Item2))));
|
||||||
|
docTable.Append(table.Rows.Select(x => new TableRow(x.Select(y => CreateTableCell(y)))));
|
||||||
|
|
||||||
|
_docBody.AppendChild(docTable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,11 @@ namespace PrecastConcretePlantContracts.BusinessLogicsContracts
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model"></param>
|
/// <param name="model"></param>
|
||||||
void SaveOrdersToPdfFile(ReportBindingModel model);
|
void SaveOrdersToPdfFile(ReportBindingModel model);
|
||||||
|
List<ReportShopReinforcedViewModel> GetShopReinforced();
|
||||||
|
List<ReportOrdersByDateViewModel> GetOrdersByDate();
|
||||||
|
void SaveShopsToWordFile(ReportBindingModel model);
|
||||||
|
void SaveShopReinforcedToExcelFile(ReportBindingModel model);
|
||||||
|
public void SaveOrdersByDateToPdfFile(ReportBindingModel model);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PrecastConcretePlantContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportOrdersByDateViewModel
|
||||||
|
{
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public int Count { get; set; }
|
||||||
|
public double Sum { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PrecastConcretePlantContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportShopReinforcedViewModel
|
||||||
|
{
|
||||||
|
public string ShopName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int TotalCount { get; set; }
|
||||||
|
|
||||||
|
public List<(string Travel, int Count)> Travels { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user