DocReport работает. То есть отчет с справочниками полностью готов!

This commit is contained in:
Tonb73 2024-12-02 11:47:54 +03:00
parent 6cd718b0b1
commit c6d1ff86fc
5 changed files with 43 additions and 17 deletions

View File

@ -37,15 +37,18 @@
пополнитьБалансПользователяToolStripMenuItem = new ToolStripMenuItem(); пополнитьБалансПользователяToolStripMenuItem = new ToolStripMenuItem();
турToolStripMenuItem = new ToolStripMenuItem(); турToolStripMenuItem = new ToolStripMenuItem();
отчетыToolStripMenuItem = new ToolStripMenuItem(); отчетыToolStripMenuItem = new ToolStripMenuItem();
DirectoryReportToolStripMenuItem = new ToolStripMenuItem();
menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// menuStrip1 // menuStrip1
// //
menuStrip1.ImageScalingSize = new Size(24, 24);
menuStrip1.Items.AddRange(new ToolStripItem[] { MenuToolStripMenuItem, OperationsToolStripMenuItem, отчетыToolStripMenuItem }); menuStrip1.Items.AddRange(new ToolStripItem[] { MenuToolStripMenuItem, OperationsToolStripMenuItem, отчетыToolStripMenuItem });
menuStrip1.Location = new Point(0, 0); menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1"; menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new Size(784, 24); menuStrip1.Padding = new Padding(9, 3, 0, 3);
menuStrip1.Size = new Size(1120, 35);
menuStrip1.TabIndex = 0; menuStrip1.TabIndex = 0;
menuStrip1.Text = "menuStrip1"; menuStrip1.Text = "menuStrip1";
// //
@ -53,27 +56,27 @@
// //
MenuToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ClientsToolStripMenuItem, RotesToolStripMenuItem, EmployeesToolStripMenuItem }); MenuToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ClientsToolStripMenuItem, RotesToolStripMenuItem, EmployeesToolStripMenuItem });
MenuToolStripMenuItem.Name = "MenuToolStripMenuItem"; MenuToolStripMenuItem.Name = "MenuToolStripMenuItem";
MenuToolStripMenuItem.Size = new Size(94, 20); MenuToolStripMenuItem.Size = new Size(139, 29);
MenuToolStripMenuItem.Text = "Справочники"; MenuToolStripMenuItem.Text = "Справочники";
// //
// ClientsToolStripMenuItem // ClientsToolStripMenuItem
// //
ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem"; ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem";
ClientsToolStripMenuItem.Size = new Size(140, 22); ClientsToolStripMenuItem.Size = new Size(212, 34);
ClientsToolStripMenuItem.Text = "Клиенты"; ClientsToolStripMenuItem.Text = "Клиенты";
ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click; ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
// //
// RotesToolStripMenuItem // RotesToolStripMenuItem
// //
RotesToolStripMenuItem.Name = "RotesToolStripMenuItem"; RotesToolStripMenuItem.Name = "RotesToolStripMenuItem";
RotesToolStripMenuItem.Size = new Size(140, 22); RotesToolStripMenuItem.Size = new Size(212, 34);
RotesToolStripMenuItem.Text = "маршруты"; RotesToolStripMenuItem.Text = "маршруты";
RotesToolStripMenuItem.Click += RotesToolStripMenuItem_Click; RotesToolStripMenuItem.Click += RotesToolStripMenuItem_Click;
// //
// EmployeesToolStripMenuItem // EmployeesToolStripMenuItem
// //
EmployeesToolStripMenuItem.Name = "EmployeesToolStripMenuItem"; EmployeesToolStripMenuItem.Name = "EmployeesToolStripMenuItem";
EmployeesToolStripMenuItem.Size = new Size(140, 22); EmployeesToolStripMenuItem.Size = new Size(212, 34);
EmployeesToolStripMenuItem.Text = "Сотрудники"; EmployeesToolStripMenuItem.Text = "Сотрудники";
EmployeesToolStripMenuItem.Click += EmployeesToolStripMenuItem_Click; EmployeesToolStripMenuItem.Click += EmployeesToolStripMenuItem_Click;
// //
@ -81,39 +84,49 @@
// //
OperationsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { пополнитьБалансПользователяToolStripMenuItem, турToolStripMenuItem }); OperationsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { пополнитьБалансПользователяToolStripMenuItem, турToolStripMenuItem });
OperationsToolStripMenuItem.Name = "OperationsToolStripMenuItem"; OperationsToolStripMenuItem.Name = "OperationsToolStripMenuItem";
OperationsToolStripMenuItem.Size = new Size(75, 20); OperationsToolStripMenuItem.Size = new Size(112, 29);
OperationsToolStripMenuItem.Text = "Операции"; OperationsToolStripMenuItem.Text = "Операции";
// //
// пополнитьБалансПользователяToolStripMenuItem // пополнитьБалансПользователяToolStripMenuItem
// //
пополнитьБалансПользователяToolStripMenuItem.Name = "пополнитьБалансПользователяToolStripMenuItem"; пополнитьБалансПользователяToolStripMenuItem.Name = "пополнитьБалансПользователяToolStripMenuItem";
пополнитьБалансПользователяToolStripMenuItem.Size = new Size(256, 22); пополнитьБалансПользователяToolStripMenuItem.Size = new Size(380, 34);
пополнитьБалансПользователяToolStripMenuItem.Text = "Пополнить баланс пользователя"; пополнитьБалансПользователяToolStripMenuItem.Text = "Пополнить баланс пользователя";
пополнитьБалансПользователяToolStripMenuItem.Click += AddMoneyToolStripMenuItem_Click; пополнитьБалансПользователяToolStripMenuItem.Click += AddMoneyToolStripMenuItem_Click;
// //
// турToolStripMenuItem // турToolStripMenuItem
// //
турToolStripMenuItem.Name = урToolStripMenuItem"; турToolStripMenuItem.Name = урToolStripMenuItem";
турToolStripMenuItem.Size = new Size(256, 22); турToolStripMenuItem.Size = new Size(380, 34);
турToolStripMenuItem.Text = "Тур"; турToolStripMenuItem.Text = "Тур";
турToolStripMenuItem.Click += ToursToolStripMenuItem_Click; турToolStripMenuItem.Click += ToursToolStripMenuItem_Click;
// //
// отчетыToolStripMenuItem // отчетыToolStripMenuItem
// //
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { DirectoryReportToolStripMenuItem });
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem"; отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
отчетыToolStripMenuItem.Size = new Size(60, 20); отчетыToolStripMenuItem.Size = new Size(88, 29);
отчетыToolStripMenuItem.Text = "Отчеты"; отчетыToolStripMenuItem.Text = "Отчеты";
// //
// DirectoryReportToolStripMenuItem
//
DirectoryReportToolStripMenuItem.Name = "DirectoryReportToolStripMenuItem";
DirectoryReportToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.W;
DirectoryReportToolStripMenuItem.Size = new Size(434, 34);
DirectoryReportToolStripMenuItem.Text = "Документы со справочниками";
DirectoryReportToolStripMenuItem.Click += DirectoryReportToolStripMenuItem_Click;
//
// FormTourAgency // FormTourAgency
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(10F, 25F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackgroundImage = Properties.Resources.Снимок_экрана_2024_11_08_2139261; BackgroundImage = Properties.Resources.Снимок_экрана_2024_11_08_2139261;
BackgroundImageLayout = ImageLayout.Stretch; BackgroundImageLayout = ImageLayout.Stretch;
ClientSize = new Size(784, 411); ClientSize = new Size(1120, 685);
Controls.Add(menuStrip1); Controls.Add(menuStrip1);
DoubleBuffered = true; DoubleBuffered = true;
MainMenuStrip = menuStrip1; MainMenuStrip = menuStrip1;
Margin = new Padding(4, 5, 4, 5);
Name = "FormTourAgency"; Name = "FormTourAgency";
StartPosition = FormStartPosition.CenterScreen; StartPosition = FormStartPosition.CenterScreen;
Text = "Тур Агенство"; Text = "Тур Агенство";
@ -134,5 +147,6 @@
private ToolStripMenuItem EmployeesToolStripMenuItem; private ToolStripMenuItem EmployeesToolStripMenuItem;
private ToolStripMenuItem пополнитьБалансПользователяToolStripMenuItem; private ToolStripMenuItem пополнитьБалансПользователяToolStripMenuItem;
private ToolStripMenuItem турToolStripMenuItem; private ToolStripMenuItem турToolStripMenuItem;
private ToolStripMenuItem DirectoryReportToolStripMenuItem;
} }
} }

View File

@ -73,4 +73,16 @@ public partial class FormTourAgency : Form
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
private void DirectoryReportToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
_container.Resolve<FormDirectoryReport>().ShowDialog();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
@ -48,7 +48,7 @@
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter

View File

@ -61,7 +61,7 @@
checkBoxClients.Name = "checkBoxClients"; checkBoxClients.Name = "checkBoxClients";
checkBoxClients.Size = new Size(97, 29); checkBoxClients.Size = new Size(97, 29);
checkBoxClients.TabIndex = 2; checkBoxClients.TabIndex = 2;
checkBoxClients.Text = "Клинты"; checkBoxClients.Text = "Клиенты";
checkBoxClients.UseVisualStyleBackColor = true; checkBoxClients.UseVisualStyleBackColor = true;
// //
// buttonBuild // buttonBuild
@ -72,7 +72,7 @@
buttonBuild.TabIndex = 3; buttonBuild.TabIndex = 3;
buttonBuild.Text = "Сформировать"; buttonBuild.Text = "Сформировать";
buttonBuild.UseVisualStyleBackColor = true; buttonBuild.UseVisualStyleBackColor = true;
buttonBuild.Click += buttonBuild_Click; buttonBuild.Click += ButtonBuild_Click;
// //
// FormDirectoryReport // FormDirectoryReport
// //

View File

@ -43,13 +43,13 @@ internal class DocReport
if (includeClients) if (includeClients)
{ {
builder.AddParagraph("Клиенты") builder.AddParagraph("Клиенты")
.AddTable([1200, 2400, 1200], GetClients()); .AddTable([2400, 1200, 1200, 1200, 2400], GetClients());
} }
if (includeEmployees) if (includeEmployees)
{ {
builder.AddParagraph("Сотрудники") builder.AddParagraph("Сотрудники")
.AddTable([2400], GetEmployees()); .AddTable([2400,2400], GetEmployees());
} }
if (includeRoutes) if (includeRoutes)