Вроде работает

This commit is contained in:
Danil Markov 2023-03-27 19:39:11 +04:00
parent aade043bf1
commit 4a88074155
20 changed files with 867 additions and 259 deletions

View File

@ -49,8 +49,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
{ {
if (document.DocumentBlanks.ContainsKey(blank.Id)) if (document.DocumentBlanks.ContainsKey(blank.Id))
{ {
record.Blanks.Add(new Tuple<string, record.Blanks.Add(new Tuple<string, int>(blank.BlankName, document.DocumentBlanks[blank.Id].Item2));
int>(blank.BlankName, document.DocumentBlanks[blank.Id].Item2));
record.TotalCount += record.TotalCount +=
document.DocumentBlanks[blank.Id].Item2; document.DocumentBlanks[blank.Id].Item2;
} }
@ -90,12 +89,12 @@ namespace LawFirmBusinessLogic.BusinessLogics
_saveToWord.CreateDoc(new WordInfo _saveToWord.CreateDoc(new WordInfo
{ {
FileName = model.FileName, FileName = model.FileName,
Title = "Список компонент", Title = "Список бланков",
Blanks = _blankStorage.GetFullList() Blanks = _blankStorage.GetFullList()
}); });
} }
/// <summary> /// <summary>
/// Сохранение компонент с указаеним продуктов в файл-Excel /// Сохранение продукта с указаеним компонент в файл-Excel
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
public void SaveDocumentBlankToExcelFile(ReportBindingModel model) public void SaveDocumentBlankToExcelFile(ReportBindingModel model)
@ -103,7 +102,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
_saveToExcel.CreateReport(new ExcelInfo _saveToExcel.CreateReport(new ExcelInfo
{ {
FileName = model.FileName, FileName = model.FileName,
Title = "Список компонент", Title = "Документы и их бланки",
DocumentBlanks = GetDocumentBlank() DocumentBlanks = GetDocumentBlank()
}); });
} }
@ -117,8 +116,8 @@ namespace LawFirmBusinessLogic.BusinessLogics
{ {
FileName = model.FileName, FileName = model.FileName,
Title = "Список заказов", Title = "Список заказов",
DateFrom = model.DateFrom!.Value, DateFrom = DateTime.SpecifyKind(model.DateFrom!.Value, DateTimeKind.Utc),
DateTo = model.DateTo!.Value, DateTo = DateTime.SpecifyKind(model.DateTo!.Value, DateTimeKind.Utc),
Orders = GetOrders(model) Orders = GetOrders(model)
}); });
} }

View File

@ -31,27 +31,25 @@ namespace LawFirmBusinessLogic.OfficePackage
{ {
ColumnName = "A", ColumnName = "A",
RowIndex = rowIndex, RowIndex = rowIndex,
Text = pc.BlankName, Text = pc.DocumentName,
StyleInfo = ExcelStyleInfoType.Text StyleInfo = ExcelStyleInfoType.Text
}); });
rowIndex++; rowIndex++;
foreach (var document in pc.Documents) foreach (var (Blanks, Count) in pc.Blanks)
{ {
InsertCellInWorksheet(new ExcelCellParameters InsertCellInWorksheet(new ExcelCellParameters
{ {
ColumnName = "B", ColumnName = "B",
RowIndex = rowIndex, RowIndex = rowIndex,
Text = document.Item1, Text = Blanks,
StyleInfo = StyleInfo = ExcelStyleInfoType.TextWithBroder
ExcelStyleInfoType.TextWithBroder
}); });
InsertCellInWorksheet(new ExcelCellParameters InsertCellInWorksheet(new ExcelCellParameters
{ {
ColumnName = "C", ColumnName = "C",
RowIndex = rowIndex, RowIndex = rowIndex,
Text = document.Item2.ToString(), Text = Count.ToString(),
StyleInfo = StyleInfo = ExcelStyleInfoType.TextWithBroder
ExcelStyleInfoType.TextWithBroder
}); });
rowIndex++; rowIndex++;
} }

View File

@ -22,7 +22,10 @@ namespace LawFirmBusinessLogic.OfficePackage
{ {
CreateParagraph(new WordParagraph CreateParagraph(new WordParagraph
{ {
Texts = new List<(string, WordTextProperties)> {(blank.BlankName, new WordTextProperties { Size = "24", }) }, Texts = new List<(string, WordTextProperties)> {
(blank.BlankName + " - ", new WordTextProperties { Size = "24", Bold=true}),
(blank.Price.ToString(), new WordTextProperties { Size = "24", })
},
TextProperties = new WordTextProperties TextProperties = new WordTextProperties
{ {
Size = "24", Size = "24",

View File

@ -54,8 +54,7 @@ namespace LawFirmBusinessLogic.OfficePackage.Implements
var properties = new ParagraphProperties(); var properties = new ParagraphProperties();
properties.AppendChild(new Justification() properties.AppendChild(new Justification()
{ {
Val = Val = GetJustificationValues(paragraphProperties.JustificationType)
GetJustificationValues(paragraphProperties.JustificationType)
}); });
properties.AppendChild(new SpacingBetweenLines properties.AppendChild(new SpacingBetweenLines
{ {
@ -67,8 +66,7 @@ namespace LawFirmBusinessLogic.OfficePackage.Implements
{ {
paragraphMarkRunProperties.AppendChild(new FontSize paragraphMarkRunProperties.AppendChild(new FontSize
{ {
Val = Val = paragraphProperties.Size
paragraphProperties.Size
}); });
} }
properties.AppendChild(paragraphMarkRunProperties); properties.AppendChild(paragraphMarkRunProperties);

View File

@ -18,7 +18,7 @@ namespace LawFirmContracts.ViewModels
[DisplayName("Статус")] [DisplayName("Статус")]
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
[DisplayName("Дата создания")] [DisplayName("Дата создания")]
public DateTime DateCreate { get; set; } = DateTime.Now; public DateTime DateCreate { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
[DisplayName("Дата выполнения")] [DisplayName("Дата выполнения")]
public DateTime? DateImplement { get; set; } public DateTime? DateImplement { get; set; }
} }

View File

@ -4,6 +4,6 @@
{ {
public string DocumentName { get; set; } = string.Empty; public string DocumentName { get; set; } = string.Empty;
public int TotalCount { get; set; } public int TotalCount { get; set; }
public List<(string Blank, int Count)> Blanks { get; set; } = new(); public List<Tuple<string, int>> Blanks { get; set; } = new();
} }
} }

View File

@ -40,14 +40,14 @@ namespace LawFirmDatabaseImplement.Implements
public List<OrderViewModel> GetFilteredList(OrderSearchModel model) public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
{ {
if (!model.Id.HasValue) if (!model.Id.HasValue && !model.DateFrom.HasValue && !model.DateTo.HasValue)
{ {
return new(); return new();
} }
using var context = new LawFirmDatabase(); using var context = new LawFirmDatabase();
return context.Orders.Where(x => x.Id == model.Id).Select(x => GetViewModel(x)).ToList(); return context.Orders.Where(x => x.Id == model.Id || model.DateFrom <= x.DateCreate && x.DateCreate <= model.DateTo).Select(x => GetViewModel(x)).ToList();
} }
public List<OrderViewModel> GetFullList() public List<OrderViewModel> GetFullList()

View File

@ -60,8 +60,7 @@ namespace LawFirmDatabaseImplement.Models
Sum = Sum, Sum = Sum,
Status = Status, Status = Status,
DateCreate = DateCreate, DateCreate = DateCreate,
DateImplement = DateImplement, DateImplement = DateImplement
DocumentName = Document.DocumentName
}; };
} }
} }

View File

@ -23,7 +23,7 @@ namespace LawFirmFileImplement.Implements
{ {
return new(); return new();
} }
return source.Orders.Where(x => x.Id.Equals(model.Id)).Select(x => GetViewModel(x)).ToList(); return source.Orders.Where(x => x.Id.Equals(model.Id) || model.DateFrom <= model.DateFrom && model.DateFrom <= model.DateTo).Select(x => GetViewModel(x)).ToList();
} }
public OrderViewModel? GetElement(OrderSearchModel model) public OrderViewModel? GetElement(OrderSearchModel model)
{ {

View File

@ -25,13 +25,13 @@ namespace LawFirmListImplement.Implements
public List<OrderViewModel> GetFilteredList(OrderSearchModel model) public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
{ {
var result = new List<OrderViewModel>(); var result = new List<OrderViewModel>();
if (!model.Id.HasValue) if (!model.Id.HasValue && model.DateFrom.HasValue && model.DateTo.HasValue)
{ {
return result; return result;
} }
foreach (var order in _source.Orders) foreach (var order in _source.Orders)
{ {
if (order.Id == model.Id) if (order.Id == model.Id || model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo)
{ {
result.Add(GetViewModel(order)); result.Add(GetViewModel(order));
} }

View File

@ -32,16 +32,16 @@
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.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dataGridView = new System.Windows.Forms.DataGridView(); this.dataGridView = new System.Windows.Forms.DataGridView();
this.buttonCreateOrder = new System.Windows.Forms.Button(); this.buttonCreateOrder = new System.Windows.Forms.Button();
this.buttonTakeOrderInWork = new System.Windows.Forms.Button(); this.buttonTakeOrderInWork = new System.Windows.Forms.Button();
this.buttonOrderReady = new System.Windows.Forms.Button(); this.buttonOrderReady = new System.Windows.Forms.Button();
this.buttonIssuedOrder = new System.Windows.Forms.Button(); this.buttonIssuedOrder = new System.Windows.Forms.Button();
this.buttonUpdate = new System.Windows.Forms.Button(); this.buttonUpdate = new System.Windows.Forms.Button();
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.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@ -69,17 +69,48 @@
// бланкиToolStripMenuItem // бланкиToolStripMenuItem
// //
this.бланкиToolStripMenuItem.Name = "бланкиToolStripMenuItem"; this.бланкиToolStripMenuItem.Name = "бланкиToolStripMenuItem";
this.бланкиToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.бланкиToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
this.бланкиToolStripMenuItem.Text = "Бланки"; this.бланкиToolStripMenuItem.Text = "Бланки";
this.бланкиToolStripMenuItem.Click += new System.EventHandler(this.BlanksToolStripMenuItem_Click); this.бланкиToolStripMenuItem.Click += new System.EventHandler(this.BlanksToolStripMenuItem_Click);
// //
// документыToolStripMenuItem // документыToolStripMenuItem
// //
this.документыToolStripMenuItem.Name = окументыToolStripMenuItem"; this.документыToolStripMenuItem.Name = окументыToolStripMenuItem";
this.документыToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.документыToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
this.документыToolStripMenuItem.Text = "Документы"; this.документыToolStripMenuItem.Text = "Документы";
this.документыToolStripMenuItem.Click += new System.EventHandler(this.DocumentsToolStripMenuItem_Click); this.документыToolStripMenuItem.Click += new System.EventHandler(this.DocumentsToolStripMenuItem_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(218, 22);
this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.BlanksReportToolStripMenuItem_Click);
//
// компонентыПоИзделиямToolStripMenuItem
//
this.компонентыПоИзделиямToolStripMenuItem.Name = омпонентыПоИзделиямToolStripMenuItem";
this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.компонентыПоИзделиямToolStripMenuItem.Text = "Компоненты по изделиям";
this.компонентыПоИзделиямToolStripMenuItem.Click += new System.EventHandler(this.DocumentBlanksReportToolStripMenuItem_Click);
//
// списокЗаказовToolStripMenuItem
//
this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.OrdersReportToolStripMenuItem_Click);
//
// dataGridView // dataGridView
// //
this.dataGridView.AllowUserToAddRows = false; this.dataGridView.AllowUserToAddRows = false;
@ -143,34 +174,6 @@
this.buttonUpdate.UseVisualStyleBackColor = true; this.buttonUpdate.UseVisualStyleBackColor = true;
this.buttonUpdate.Click += new System.EventHandler(this.ButtonRef_Click); this.buttonUpdate.Click += new System.EventHandler(this.ButtonRef_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(218, 22);
this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
//
// компонентыПоИзделиямToolStripMenuItem
//
this.компонентыПоИзделиямToolStripMenuItem.Name = омпонентыПоИзделиямToolStripMenuItem";
this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.компонентыПоИзделиямToolStripMenuItem.Text = "Компоненты по изделиям";
//
// списокЗаказовToolStripMenuItem
//
this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
//
// FormMain // FormMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
@ -186,6 +189,7 @@
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Name = "FormMain"; this.Name = "FormMain";
this.Text = "Юридическая фирма"; this.Text = "Юридическая фирма";
this.Load += new System.EventHandler(this.FormMain_Load);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();

View File

@ -1,4 +1,5 @@
using LawFirmContracts.BindingModels; using LawFirmBusinessLogic.BusinessLogics;
using LawFirmContracts.BindingModels;
using LawFirmContracts.BusinessLogicsContracts; using LawFirmContracts.BusinessLogicsContracts;
using LawFirmDataModels.Enums; using LawFirmDataModels.Enums;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -10,11 +11,14 @@ namespace LawFirmView
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IOrderLogic _orderLogic; private readonly IOrderLogic _orderLogic;
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic) private readonly IReportLogic _reportLogic;
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic)
{ {
InitializeComponent(); InitializeComponent();
_logger = logger; _logger = logger;
_orderLogic = orderLogic; _orderLogic = orderLogic;
_reportLogic = reportLogic;
} }
private void FormMain_Load(object sender, EventArgs e) private void FormMain_Load(object sender, EventArgs e)
{ {
@ -162,5 +166,39 @@ namespace LawFirmView
form.ShowDialog(); form.ShowDialog();
} }
} }
private void BlanksReportToolStripMenuItem_Click(object sender, EventArgs
e)
{
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
if (dialog.ShowDialog() == DialogResult.OK)
{
_reportLogic.SaveBlanksToWordFile(new ReportBindingModel
{
FileName = dialog.FileName
});
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
private void DocumentBlanksReportToolStripMenuItem_Click(object sender,
EventArgs e)
{
var service =
Program.ServiceProvider?.GetService(typeof(FormReportDocumentBlanks));
if (service is FormReportDocumentBlanks form)
{
form.ShowDialog();
}
}
private void OrdersReportToolStripMenuItem_Click(object sender, EventArgs e)
{
var service =
Program.ServiceProvider?.GetService(typeof(FormReportOrders));
if (service is FormReportOrders form)
{
form.ShowDialog();
}
}
} }
} }

View File

@ -44,6 +44,7 @@
this.buttonSaveToExcel.TabIndex = 0; this.buttonSaveToExcel.TabIndex = 0;
this.buttonSaveToExcel.Text = "Сохранить в Excel"; this.buttonSaveToExcel.Text = "Сохранить в Excel";
this.buttonSaveToExcel.UseVisualStyleBackColor = true; this.buttonSaveToExcel.UseVisualStyleBackColor = true;
this.buttonSaveToExcel.Click += new System.EventHandler(this.ButtonSaveToExcel_Click);
// //
// dataGridView // dataGridView
// //
@ -62,12 +63,12 @@
// //
// ColumnBlank // ColumnBlank
// //
this.ColumnBlank.HeaderText = "Бланк"; this.ColumnBlank.HeaderText = "Документ";
this.ColumnBlank.Name = "ColumnBlank"; this.ColumnBlank.Name = "ColumnBlank";
// //
// ColumnDocument // ColumnDocument
// //
this.ColumnDocument.HeaderText = "Документ"; this.ColumnDocument.HeaderText = "Бланк";
this.ColumnDocument.Name = "ColumnDocument"; this.ColumnDocument.Name = "ColumnDocument";
// //
// ColumnCount // ColumnCount

View File

@ -28,8 +28,8 @@ namespace LawFirmView
dataGridView.Rows.Clear(); dataGridView.Rows.Clear();
foreach (var elem in dict) foreach (var elem in dict)
{ {
dataGridView.Rows.Add(new object[] { elem.BlankName, "", "" }); dataGridView.Rows.Add(new object[] { elem.DocumentName, "", "" });
foreach (var listElem in elem.Documents) foreach (var listElem in elem.Blanks)
{ {
dataGridView.Rows.Add(new object[] { "", dataGridView.Rows.Add(new object[] { "",
listElem.Item1, listElem.Item2 }); listElem.Item1, listElem.Item2 });
@ -50,5 +50,34 @@ elem.TotalCount });
} }
} }
private void ButtonSaveToExcel_Click(object sender, EventArgs e)
{
using var dialog = new SaveFileDialog
{
Filter = "xlsx|*.xlsx"
};
if (dialog.ShowDialog() == DialogResult.OK)
{
try
{
_logic.SaveDocumentBlankToExcelFile(new ReportBindingModel
{
FileName = dialog.FileName
});
_logger.LogInformation("Saving list of computers by components");
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error saving list of computers by components");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
} }
} }

View File

@ -66,13 +66,4 @@
<metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ColumnBlank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnDocument.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

View File

@ -1,4 +1,4 @@
namespace TravelCompanyView namespace LawFirmView
{ {
partial class FormReportOrders partial class FormReportOrders
{ {
@ -28,103 +28,104 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
labelFrom = new Label(); this.buttonMake = new System.Windows.Forms.Button();
dateTimePickerFrom = new DateTimePicker(); this.buttonToPdf = new System.Windows.Forms.Button();
labelTo = new Label(); this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker();
dateTimePickerTo = new DateTimePicker(); this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker();
buttonMake = new Button(); this.label1 = new System.Windows.Forms.Label();
buttonToPDF = new Button(); this.label2 = new System.Windows.Forms.Label();
panel = new Panel(); this.panel = new System.Windows.Forms.Panel();
panel.SuspendLayout(); this.panel.SuspendLayout();
SuspendLayout(); this.SuspendLayout();
//
// labelFrom
//
labelFrom.AutoSize = true;
labelFrom.Location = new Point(11, 16);
labelFrom.Name = "labelFrom";
labelFrom.Size = new Size(23, 25);
labelFrom.TabIndex = 0;
labelFrom.Text = "С";
//
// dateTimePickerFrom
//
dateTimePickerFrom.Location = new Point(40, 11);
dateTimePickerFrom.Name = "dateTimePickerFrom";
dateTimePickerFrom.Size = new Size(224, 31);
dateTimePickerFrom.TabIndex = 1;
//
// labelTo
//
labelTo.AutoSize = true;
labelTo.Location = new Point(270, 16);
labelTo.Name = "labelTo";
labelTo.Size = new Size(33, 25);
labelTo.TabIndex = 2;
labelTo.Text = "по";
//
// dateTimePickerTo
//
dateTimePickerTo.Location = new Point(309, 11);
dateTimePickerTo.Name = "dateTimePickerTo";
dateTimePickerTo.Size = new Size(224, 31);
dateTimePickerTo.TabIndex = 3;
// //
// buttonMake // buttonMake
// //
buttonMake.Location = new Point(613, 11); this.buttonMake.Location = new System.Drawing.Point(354, 3);
buttonMake.Name = "buttonMake"; this.buttonMake.Name = "buttonMake";
buttonMake.Size = new Size(170, 34); this.buttonMake.Size = new System.Drawing.Size(127, 23);
buttonMake.TabIndex = 4; this.buttonMake.TabIndex = 0;
buttonMake.Text = "Сформировать"; this.buttonMake.Text = "Сформировать";
buttonMake.UseVisualStyleBackColor = true; this.buttonMake.UseVisualStyleBackColor = true;
buttonMake.Click += ButtonMake_Click; this.buttonMake.Click += new System.EventHandler(this.ButtonMake_Click);
// //
// buttonToPDF // buttonToPdf
// //
buttonToPDF.Location = new Point(1061, 11); this.buttonToPdf.Location = new System.Drawing.Point(487, 5);
buttonToPDF.Name = "buttonToPDF"; this.buttonToPdf.Name = "buttonToPdf";
buttonToPDF.Size = new Size(170, 34); this.buttonToPdf.Size = new System.Drawing.Size(75, 22);
buttonToPDF.TabIndex = 5; this.buttonToPdf.TabIndex = 1;
buttonToPDF.Text = "В PDF"; this.buttonToPdf.Text = "В PDF";
buttonToPDF.UseVisualStyleBackColor = true; this.buttonToPdf.UseVisualStyleBackColor = true;
buttonToPDF.Click += ButtonToPdf_Click; this.buttonToPdf.Click += new System.EventHandler(this.ButtonToPdf_Click);
//
// dateTimePickerFrom
//
this.dateTimePickerFrom.Location = new System.Drawing.Point(28, 3);
this.dateTimePickerFrom.Name = "dateTimePickerFrom";
this.dateTimePickerFrom.Size = new System.Drawing.Size(144, 23);
this.dateTimePickerFrom.TabIndex = 2;
//
// dateTimePickerTo
//
this.dateTimePickerTo.Location = new System.Drawing.Point(204, 3);
this.dateTimePickerTo.Name = "dateTimePickerTo";
this.dateTimePickerTo.Size = new System.Drawing.Size(144, 23);
this.dateTimePickerTo.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(15, 15);
this.label1.TabIndex = 4;
this.label1.Text = "С";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(178, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(21, 15);
this.label2.TabIndex = 5;
this.label2.Text = "по";
// //
// panel // panel
// //
panel.Controls.Add(buttonToPDF); this.panel.Controls.Add(this.dateTimePickerFrom);
panel.Controls.Add(dateTimePickerTo); this.panel.Controls.Add(this.buttonToPdf);
panel.Controls.Add(buttonMake); this.panel.Controls.Add(this.label1);
panel.Controls.Add(labelTo); this.panel.Controls.Add(this.buttonMake);
panel.Controls.Add(dateTimePickerFrom); this.panel.Controls.Add(this.label2);
panel.Controls.Add(labelFrom); this.panel.Controls.Add(this.dateTimePickerTo);
panel.Dock = DockStyle.Top; this.panel.Location = new System.Drawing.Point(0, 0);
panel.Location = new Point(0, 0); this.panel.Name = "panel";
panel.Name = "panel"; this.panel.Size = new System.Drawing.Size(893, 32);
panel.Size = new Size(1244, 56); this.panel.TabIndex = 6;
panel.TabIndex = 6;
// //
// FormReportOrders // FormReportOrders
// //
AutoScaleDimensions = new SizeF(10F, 25F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new Size(1244, 450); this.ClientSize = new System.Drawing.Size(892, 325);
Controls.Add(panel); this.Controls.Add(this.panel);
Name = "FormReportOrders"; this.Name = "FormReportOrders";
Text = "Заказы"; this.Text = "FormReportOrders";
panel.ResumeLayout(false); this.Load += new System.EventHandler(this.FormReportOrders_Load);
panel.PerformLayout(); this.panel.ResumeLayout(false);
ResumeLayout(false); this.panel.PerformLayout();
this.ResumeLayout(false);
} }
#endregion #endregion
private Label labelFrom;
private DateTimePicker dateTimePickerFrom;
private Label labelTo;
private DateTimePicker dateTimePickerTo;
private Button buttonMake; private Button buttonMake;
private Button buttonToPDF; private Button buttonToPdf;
private DateTimePicker dateTimePickerFrom;
private DateTimePicker dateTimePickerTo;
private Label label1;
private Label label2;
private Panel panel; private Panel panel;
} }
} }

View File

@ -1,18 +1,16 @@
using Microsoft.Extensions.Logging; using LawFirmContracts.BindingModels;
using Microsoft.Reporting.WinForms;
using LawFirmContracts.BindingModels;
using LawFirmContracts.BusinessLogicsContracts; using LawFirmContracts.BusinessLogicsContracts;
using Microsoft.Extensions.Logging;
using Microsoft.Reporting.WinForms;
using System.Windows.Forms;
namespace TravelCompanyView namespace LawFirmView
{ {
public partial class FormReportOrders : Form public partial class FormReportOrders : Form
{ {
private readonly ReportViewer reportViewer; private readonly ReportViewer reportViewer;
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IReportLogic _logic; private readonly IReportLogic _logic;
public FormReportOrders(ILogger<FormReportOrders> logger, IReportLogic logic) public FormReportOrders(ILogger<FormReportOrders> logger, IReportLogic logic)
{ {
InitializeComponent(); InitializeComponent();
@ -20,53 +18,67 @@ namespace TravelCompanyView
_logic = logic; _logic = logic;
reportViewer = new ReportViewer reportViewer = new ReportViewer
{ {
Dock = DockStyle.Fill Dock = DockStyle.Bottom
}; };
reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open)); try
{
reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open));
}catch(Exception ex){}
Controls.Clear(); Controls.Clear();
Controls.Add(reportViewer); Controls.Add(reportViewer);
Controls.Add(panel); Controls.Add(panel);
} }
private void FormReportOrders_Load(object sender, EventArgs e)
{
}
private void ButtonMake_Click(object sender, EventArgs e) private void ButtonMake_Click(object sender, EventArgs e)
{ {
if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date)
{ {
MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Дата начала должна быть меньше даты окончания",
"Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
try try
{ {
var dataSource = _logic.GetOrders(new ReportBindingModel var dataSource = _logic.GetOrders(new ReportBindingModel
{ {
DateFrom = dateTimePickerFrom.Value, DateFrom = DateTime.SpecifyKind(dateTimePickerFrom.Value, DateTimeKind.Utc),
DateTo = dateTimePickerTo.Value DateTo = DateTime.SpecifyKind(dateTimePickerTo.Value, DateTimeKind.Utc)
}); });
var source = new ReportDataSource("DataSetOrders", dataSource); var source = new ReportDataSource("DataSetOrders", dataSource);
reportViewer.LocalReport.DataSources.Clear(); reportViewer.LocalReport.DataSources.Clear();
reportViewer.LocalReport.DataSources.Add(source); reportViewer.LocalReport.DataSources.Add(source);
var parameters = new[] { new ReportParameter("ReportParameterPeriod", var parameters = new[] { new ReportParameter("ReportParameterPeriod",
$"c {dateTimePickerFrom.Value.ToShortDateString()} по {dateTimePickerTo.Value.ToShortDateString()}") }; $"c{dateTimePickerFrom.Value.ToShortDateString()} по {dateTimePickerTo.Value.ToShortDateString()}") };
reportViewer.LocalReport.SetParameters(parameters); reportViewer.LocalReport.SetParameters(parameters);
reportViewer.RefreshReport(); reportViewer.RefreshReport();
_logger.LogInformation("Загрузка списка заказов на период {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); _logger.LogInformation("Загрузка списка заказов на период {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(),
dateTimePickerTo.Value.ToShortDateString());
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Ошибка загрузки списка заказов на период"); _logger.LogError(ex, "Ошибка загрузки списка заказов на период");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
MessageBoxIcon.Error);
} }
} }
private void ButtonToPdf_Click(object sender, EventArgs e) private void ButtonToPdf_Click(object sender, EventArgs e)
{ {
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date) if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date)
{ {
MessageBox.Show("Дата начала должна быть меньше даты окончания", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Дата начала должна быть меньше даты окончания",
"Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
using var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" }; using var dialog = new SaveFileDialog
{
Filter = "pdf|*.pdf"
};
if (dialog.ShowDialog() == DialogResult.OK) if (dialog.ShowDialog() == DialogResult.OK)
{ {
try try
@ -74,16 +86,20 @@ namespace TravelCompanyView
_logic.SaveOrdersToPdfFile(new ReportBindingModel _logic.SaveOrdersToPdfFile(new ReportBindingModel
{ {
FileName = dialog.FileName, FileName = dialog.FileName,
DateFrom = dateTimePickerFrom.Value, DateFrom = DateTime.SpecifyKind(dateTimePickerFrom.Value, DateTimeKind.Utc),
DateTo = dateTimePickerTo.Value DateTo = DateTime.SpecifyKind(dateTimePickerTo.Value, DateTimeKind.Utc)
}); });
_logger.LogInformation("Сохранение списка заказов на период {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); _logger.LogInformation("Сохранение списка заказов на период {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(),
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); dateTimePickerTo.Value.ToShortDateString());
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK,
MessageBoxIcon.Information);
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Ошибка сохранения списка заказов на период"); _logger.LogError(ex, "Ошибка сохранения списка заказов на период");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
MessageBoxIcon.Error);
} }
} }
} }

View File

@ -1,4 +1,6 @@
using LawFirmBusinessLogic.BusinessLogics; using LawFirmBusinessLogic.BusinessLogics;
using LawFirmBusinessLogic.OfficePackage.Implements;
using LawFirmBusinessLogic.OfficePackage;
using LawFirmContracts.BusinessLogicsContracts; using LawFirmContracts.BusinessLogicsContracts;
using LawFirmContracts.StoragesContracts; using LawFirmContracts.StoragesContracts;
using LawFirmDatabaseImplement.Implements; using LawFirmDatabaseImplement.Implements;
@ -40,6 +42,11 @@ namespace LawFirmView
services.AddTransient<IBlankLogic, BlankLogic>(); services.AddTransient<IBlankLogic, BlankLogic>();
services.AddTransient<IOrderLogic, OrderLogic>(); services.AddTransient<IOrderLogic, OrderLogic>();
services.AddTransient<IDocumentLogic, DocumentLogic>(); services.AddTransient<IDocumentLogic, DocumentLogic>();
services.AddTransient<IReportLogic, ReportLogic>();
services.AddTransient<AbstractSaveToWord, SaveToWord>();
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
services.AddTransient<FormMain>(); services.AddTransient<FormMain>();
services.AddTransient<FormBlank>(); services.AddTransient<FormBlank>();

View File

@ -1,76 +1,599 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<AutoRefresh>0</AutoRefresh> <AutoRefresh>0</AutoRefresh>
<ReportSections> <DataSources>
<ReportSection> <DataSource Name="LawFirmContractsViewModels">
<Body> <ConnectionProperties>
<ReportItems> <DataProvider>System.Data.DataSet</DataProvider>
<Textbox Name="Textbox1"> <ConnectString>/* Local Connection */</ConnectString>
<CanGrow>true</CanGrow> </ConnectionProperties>
<KeepTogether>true</KeepTogether> <rd:DataSourceID>10791c83-cee8-4a38-bbd0-245fc17cefb3</rd:DataSourceID>
<Paragraphs> </DataSource>
<Paragraph> </DataSources>
<TextRuns> <DataSets>
<TextRun> <DataSet Name="DataSetOrders">
<Value /> <Query>
<Style /> <DataSourceName>LawFirmContractsViewModels</DataSourceName>
</TextRun> <CommandText>/* Local Query */</CommandText>
</TextRuns> </Query>
<Fields>
<Field Name="Id">
<DataField>Id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="DateCreate">
<DataField>DateCreate</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
<Field Name="DocumentName">
<DataField>DocumentName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="OrderStatus">
<DataField>OrderStatus</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Sum">
<DataField>Sum</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>LawFirmContracts.ViewModels</rd:DataSetName>
<rd:TableName>ReportOrdersViewModel</rd:TableName>
<rd:ObjectDataSourceType>LawFirmContracts.ViewModels.ReportOrdersViewModel, LawFirmContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
</rd:DataSetInfo>
</DataSet>
</DataSets>
<ReportSections>
<ReportSection>
<Body>
<ReportItems>
<Textbox Name="ReportParameterPeriod">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!ReportParameterPeriod.Value</Value>
<Style>
<FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>ReportParameterPeriod</rd:DefaultName>
<Top>1cm</Top>
<Height>1cm</Height>
<Width>21cm</Width>
<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="TextboxTitle">
<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>
<Height>1cm</Height>
<Width>21cm</Width>
<ZIndex>1</ZIndex>
<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>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.21438cm</Width>
</TablixColumn>
<TablixColumn>
<Width>8.23317cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Номер</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</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="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Дата создания</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</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="Textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Документ</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</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="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="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Сумма</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox7</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="Id">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Id.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Id</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="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="DocumentName">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!DocumentName.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>DocumentName</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="OrderStatus">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!OrderStatus.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>OrderStatus</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 />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<KeepWithGroup>After</KeepWithGroup>
</TablixMember>
<TablixMember>
<Group Name="Подробности" />
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSetOrders</DataSetName>
<Top>2.48391cm</Top>
<Left>0.55245cm</Left>
<Height>1.2cm</Height>
<Width>18.94755cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>Double</Style>
</Border>
</Style>
</Tablix>
<Textbox Name="TextboxTotalSum">
<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>
<Top>4cm</Top>
<Left>12cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="SumTotal">
<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>
<Top>4cm</Top>
<Left>14.5cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>5.72875cm</Height>
<Style /> <Style />
</Paragraph> </Body>
</Paragraphs> <Width>21cm</Width>
<rd:DefaultName>Textbox1</rd:DefaultName> <Page>
<Top>1.58432cm</Top> <PageHeight>29.7cm</PageHeight>
<Left>5.89703cm</Left> <PageWidth>21cm</PageWidth>
<Height>0.6cm</Height> <LeftMargin>2cm</LeftMargin>
<Width>2.5cm</Width> <RightMargin>2cm</RightMargin>
<Style> <TopMargin>2cm</TopMargin>
<Border> <BottomMargin>2cm</BottomMargin>
<Style>None</Style> <ColumnSpacing>0.13cm</ColumnSpacing>
</Border> <Style />
<PaddingLeft>2pt</PaddingLeft> </Page>
<PaddingRight>2pt</PaddingRight> </ReportSection>
<PaddingTop>2pt</PaddingTop> </ReportSections>
<PaddingBottom>2pt</PaddingBottom> <ReportParameters>
</Style> <ReportParameter Name="ReportParameterPeriod">
</Textbox> <DataType>String</DataType>
</ReportItems> <Nullable>true</Nullable>
<Height>2in</Height> <Prompt>ReportParameter1</Prompt>
<Style /> </ReportParameter>
</Body> </ReportParameters>
<Width>6.5in</Width> <ReportParametersLayout>
<Page> <GridLayoutDefinition>
<PageHeight>29.7cm</PageHeight> <NumberOfColumns>4</NumberOfColumns>
<PageWidth>21cm</PageWidth> <NumberOfRows>2</NumberOfRows>
<LeftMargin>2cm</LeftMargin> <CellDefinitions>
<RightMargin>2cm</RightMargin> <CellDefinition>
<TopMargin>2cm</TopMargin> <ColumnIndex>0</ColumnIndex>
<BottomMargin>2cm</BottomMargin> <RowIndex>0</RowIndex>
<ColumnSpacing>0.13cm</ColumnSpacing> <ParameterName>ReportParameterPeriod</ParameterName>
<Style /> </CellDefinition>
</Page> </CellDefinitions>
</ReportSection> </GridLayoutDefinition>
</ReportSections> </ReportParametersLayout>
<ReportParameters> <rd:ReportUnitType>Cm</rd:ReportUnitType>
<ReportParameter Name="ReportParameterPeriod"> <rd:ReportID>2de0031a-4d17-449d-922d-d9fc54572312</rd:ReportID>
<DataType>String</DataType>
<Nullable>true</Nullable>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<ReportParametersLayout>
<GridLayoutDefinition>
<NumberOfColumns>4</NumberOfColumns>
<NumberOfRows>2</NumberOfRows>
<CellDefinitions>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>ReportParameterPeriod</ParameterName>
</CellDefinition>
</CellDefinitions>
</GridLayoutDefinition>
</ReportParametersLayout>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>c390064e-687c-47f6-8c0d-0531793cf115</rd:ReportID>
</Report> </Report>

1
LawFirm/Temp.txt Normal file
View File

@ -0,0 +1 @@