Лаб№4 - Фиксация.
This commit is contained in:
parent
774a8fcffd
commit
6dc933b799
@ -40,24 +40,22 @@ namespace AbstractFoodOrdersBusinessLogic.BusinessLogics
|
|||||||
public List<ReportDishComponentViewModel> GetDishComponent()
|
public List<ReportDishComponentViewModel> GetDishComponent()
|
||||||
{
|
{
|
||||||
var components = _componentStorage.GetFullList();
|
var components = _componentStorage.GetFullList();
|
||||||
var products = _dishStorage.GetFullList();
|
var dishes = _dishStorage.GetFullList();
|
||||||
var list = new List<ReportDishComponentViewModel>();
|
var list = new List<ReportDishComponentViewModel>();
|
||||||
foreach (var component in components)
|
foreach (var dish in dishes)
|
||||||
{
|
{
|
||||||
var record = new ReportDishComponentViewModel
|
var record = new ReportDishComponentViewModel
|
||||||
{
|
{
|
||||||
ComponentName = component.ComponentName,
|
DishName = dish.DishName,
|
||||||
Dishes = new List<Tuple<string, int>>(),
|
Components = new List<(string, int)>(),
|
||||||
TotalCount = 0
|
TotalCount = 0
|
||||||
};
|
};
|
||||||
foreach (var product in products)
|
foreach (var component in components)
|
||||||
{
|
{
|
||||||
if (product.DishComponents.ContainsKey(component.Id))
|
if (dish.DishComponents.ContainsKey(component.Id))
|
||||||
{
|
{
|
||||||
record.Dishes.Add(new Tuple<string,
|
record.Components.Add(new (component.ComponentName, dish.DishComponents[component.Id].Item2));
|
||||||
int>(product.DishName, product.DishComponents[component.Id].Item2));
|
record.TotalCount += dish.DishComponents[component.Id].Item2;
|
||||||
record.TotalCount +=
|
|
||||||
product.DishComponents[component.Id].Item2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list.Add(record);
|
list.Add(record);
|
||||||
@ -82,6 +80,7 @@ namespace AbstractFoodOrdersBusinessLogic.BusinessLogics
|
|||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
DateCreate = x.DateCreate,
|
DateCreate = x.DateCreate,
|
||||||
DishName = x.DishName,
|
DishName = x.DishName,
|
||||||
|
Status = x.Status.ToString(),
|
||||||
Sum = x.Sum
|
Sum = x.Sum
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
@ -95,8 +94,8 @@ namespace AbstractFoodOrdersBusinessLogic.BusinessLogics
|
|||||||
_saveToWord.CreateDoc(new WordInfo
|
_saveToWord.CreateDoc(new WordInfo
|
||||||
{
|
{
|
||||||
FileName = model.FileName,
|
FileName = model.FileName,
|
||||||
Title = "Список компонент",
|
Title = "Список блюд",
|
||||||
Components = _componentStorage.GetFullList()
|
Dishes = _dishStorage.GetFullList()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -108,7 +107,7 @@ namespace AbstractFoodOrdersBusinessLogic.BusinessLogics
|
|||||||
_saveToExcel.CreateReport(new ExcelInfo
|
_saveToExcel.CreateReport(new ExcelInfo
|
||||||
{
|
{
|
||||||
FileName = model.FileName,
|
FileName = model.FileName,
|
||||||
Title = "Список компонент",
|
Title = "Список блюд",
|
||||||
DishComponents = GetDishComponent()
|
DishComponents = GetDishComponent()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels;
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -35,27 +36,25 @@ namespace AbstractFoodOrdersBusinessLogic.OfficePackage
|
|||||||
{
|
{
|
||||||
ColumnName = "A",
|
ColumnName = "A",
|
||||||
RowIndex = rowIndex,
|
RowIndex = rowIndex,
|
||||||
Text = pc.ComponentName,
|
Text = pc.DishName,
|
||||||
StyleInfo = ExcelStyleInfoType.Text
|
StyleInfo = ExcelStyleInfoType.Text
|
||||||
});
|
});
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
foreach (var product in pc.Dishes)
|
foreach (var (Component, Count) in pc.Components)
|
||||||
{
|
{
|
||||||
InsertCellInWorksheet(new ExcelCellParameters
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
{
|
{
|
||||||
ColumnName = "B",
|
ColumnName = "B",
|
||||||
RowIndex = rowIndex,
|
RowIndex = rowIndex,
|
||||||
Text = product.Item1,
|
Text = Component,
|
||||||
StyleInfo =
|
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||||
ExcelStyleInfoType.TextWithBroder
|
|
||||||
});
|
});
|
||||||
InsertCellInWorksheet(new ExcelCellParameters
|
InsertCellInWorksheet(new ExcelCellParameters
|
||||||
{
|
{
|
||||||
ColumnName = "C",
|
ColumnName = "C",
|
||||||
RowIndex = rowIndex,
|
RowIndex = rowIndex,
|
||||||
Text = product.Item2.ToString(),
|
Text = Count.ToString(),
|
||||||
StyleInfo =
|
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||||
ExcelStyleInfoType.TextWithBroder
|
|
||||||
});
|
});
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels;
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -14,21 +15,17 @@ namespace AbstractFoodOrdersBusinessLogic.OfficePackage
|
|||||||
CreatePdf(info);
|
CreatePdf(info);
|
||||||
CreateParagraph(new PdfParagraph
|
CreateParagraph(new PdfParagraph
|
||||||
{
|
{
|
||||||
Text = info.Title,
|
Text = info.Title, Style ="NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
Style =
|
|
||||||
"NormalTitle",
|
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
|
||||||
});
|
});
|
||||||
CreateParagraph(new PdfParagraph
|
CreateParagraph(new PdfParagraph
|
||||||
{
|
{
|
||||||
Text = $"с{ info.DateFrom.ToShortDateString() } по { info.DateTo.ToShortDateString() }", Style = "Normal",
|
Text = $"с { info.DateFrom.ToShortDateString() } по { info.DateTo.ToShortDateString() }", Style = "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm" });
|
CreateTable(new List<string> { "2cm", "4cm", "6cm", "3cm", "3cm" });
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { "Номер", "Дата заказа", "Изделие",
|
Texts = new List<string> { "Номер", "Дата заказа", "Блюдо", "Статус", "Сумма" },
|
||||||
"Сумма" },
|
|
||||||
Style = "NormalTitle",
|
Style = "NormalTitle",
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
@ -36,8 +33,7 @@ namespace AbstractFoodOrdersBusinessLogic.OfficePackage
|
|||||||
{
|
{
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { order.Id.ToString(),
|
Texts = new List<string> { order.Id.ToString(),order.DateCreate.ToShortDateString(), order.DishName, order.Status.ToString(), order.Sum.ToString() },
|
||||||
order.DateCreate.ToShortDateString(), order.DishName, order.Sum.ToString() },
|
|
||||||
Style = "Normal",
|
Style = "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||||
});
|
});
|
||||||
|
@ -23,12 +23,12 @@ WordTextProperties { Bold = true, Size = "24", }) },
|
|||||||
JustificationType = WordJustificationType.Center
|
JustificationType = WordJustificationType.Center
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
foreach (var component in info.Components)
|
foreach (var dish in info.Dishes)
|
||||||
{
|
{
|
||||||
CreateParagraph(new WordParagraph
|
CreateParagraph(new WordParagraph
|
||||||
{
|
{
|
||||||
Texts = new List<(string, WordTextProperties)> {
|
Texts = new List<(string, WordTextProperties)> {
|
||||||
(component.ComponentName, new WordTextProperties { Size = "24", }) },
|
(dish.DishName, new WordTextProperties {Bold = true, Size = "24", }), (" Стоимость: " + dish.Price.ToString(), new WordTextProperties { Size = "24", }) },
|
||||||
TextProperties = new WordTextProperties
|
TextProperties = new WordTextProperties
|
||||||
{
|
{
|
||||||
Size = "24",
|
Size = "24",
|
||||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums
|
||||||
{
|
{
|
||||||
public enum ExcelStyleInfoType
|
public enum ExcelStyleInfoType
|
||||||
{
|
{
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums
|
||||||
{
|
{
|
||||||
public enum PdfParagraphAlignmentType
|
public enum PdfParagraphAlignmentType
|
||||||
{
|
{
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
|
||||||
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
||||||
{
|
{
|
||||||
|
@ -11,11 +11,7 @@ namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
|||||||
{
|
{
|
||||||
public string FileName { get; set; } = string.Empty;
|
public string FileName { get; set; } = string.Empty;
|
||||||
public string Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
public List<ReportDishComponentViewModel> DishComponents
|
public List<ReportDishComponentViewModel> DishComponents { get; set; } = new();
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
} = new();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
|
||||||
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
|
||||||
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,6 @@ namespace AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels
|
|||||||
{
|
{
|
||||||
public string FileName { get; set; } = string.Empty;
|
public string FileName { get; set; } = string.Empty;
|
||||||
public string Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
public List<ComponentViewModel> Components { get; set; } = new();
|
public List<DishViewModel> Dishes { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
|
||||||
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.Implements
|
namespace AbstractFoodOrdersBusinessLogic.OfficePackage.Implements
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels;
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperEnums;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.HelperModels;
|
||||||
using MigraDoc.DocumentObjectModel;
|
using MigraDoc.DocumentObjectModel;
|
||||||
using MigraDoc.DocumentObjectModel.Tables;
|
using MigraDoc.DocumentObjectModel.Tables;
|
||||||
using MigraDoc.Rendering;
|
using MigraDoc.Rendering;
|
||||||
|
@ -8,8 +8,8 @@ namespace AbstractFoodOrdersContracts.ViewModels
|
|||||||
{
|
{
|
||||||
public class ReportDishComponentViewModel
|
public class ReportDishComponentViewModel
|
||||||
{
|
{
|
||||||
public string ComponentName { get; set; } = string.Empty;
|
public string DishName { get; set; } = string.Empty;
|
||||||
public int TotalCount { get; set; }
|
public int TotalCount { get; set; }
|
||||||
public List<Tuple<string, int>> Dishes { get; set; } = new();
|
public List<(string Component, int Count)> Components { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,6 @@ namespace AbstractFoodOrdersContracts.ViewModels
|
|||||||
public DateTime DateCreate { get; set; }
|
public DateTime DateCreate { get; set; }
|
||||||
public string DishName { get; set; } = string.Empty;
|
public string DishName { get; set; } = string.Empty;
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
|
public string Status { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,15 +23,26 @@ namespace AbstractFoodOrdersDatabaseImplement.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 AbstractFoodOrdersDatabase();
|
if (!model.DateFrom.HasValue || !model.DateTo.HasValue)
|
||||||
return context.Orders
|
{
|
||||||
.Where(x => x.Id == model.Id)
|
using var context = new AbstractFoodOrdersDatabase();
|
||||||
.Select(x => AccessDishStorage(x.GetViewModel, context))
|
return context.Orders
|
||||||
.ToList();
|
.Where(x => x.Id == model.Id)
|
||||||
|
.Select(x => AccessDishStorage(x.GetViewModel, context))
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using var context = new AbstractFoodOrdersDatabase();
|
||||||
|
return context.Orders
|
||||||
|
.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo)
|
||||||
|
.Select(x => AccessDishStorage(x.GetViewModel, context))
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||||
{
|
{
|
||||||
|
@ -29,17 +29,29 @@ namespace AbstractFoodOrdersListImplement.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 == null || !model.Id.HasValue)
|
if (!model.Id.HasValue && !model.DateFrom.HasValue && !model.DateTo.HasValue)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
foreach (var order in _source.Orders)
|
if (!model.DateFrom.HasValue || !model.DateTo.HasValue)
|
||||||
{
|
{
|
||||||
if (order.Id == model.Id)
|
foreach (var order in _source.Orders)
|
||||||
{
|
{
|
||||||
result.Add(AttachReinforcedName(order.GetViewModel));
|
if (order.Id == model.Id)
|
||||||
|
{
|
||||||
|
result.Add(AttachReinforcedName(order.GetViewModel));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var order in _source.Orders)
|
||||||
|
{
|
||||||
|
if (order.DateCreate >= model.DateFrom && order.DateCreate <= model.DateTo)
|
||||||
|
{
|
||||||
|
result.Add(AttachReinforcedName(order.GetViewModel));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -27,12 +27,11 @@ namespace AbstractFoodOrdersFileImplement.Implements
|
|||||||
|
|
||||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||||
{
|
{
|
||||||
if (!model.Id.HasValue)
|
if (!model.DateFrom.HasValue || !model.DateTo.HasValue)
|
||||||
{
|
{
|
||||||
return new();
|
return new();
|
||||||
}
|
}
|
||||||
|
return source.Orders.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo).Select(x => GetViewModel(x)).Select(y => { y.DishName = source.Dishes.FirstOrDefault(x => x.Id == y?.DishId)?.DishName; return y; }).ToList();
|
||||||
return source.Orders.Where(x => x.Id == model.Id).Select(x => GetViewModel(x)).ToList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||||
|
@ -9,12 +9,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.4">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" />
|
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" />
|
||||||
|
<PackageReference Include="ReportViewerCore.WinForms" Version="15.1.17" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -36,7 +37,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Properties\" />
|
<None Update="ReportOrders.rdlc">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
281
FoodOrders/FoodOrders/FormMain.Designer.cs
generated
281
FoodOrders/FoodOrders/FormMain.Designer.cs
generated
@ -28,170 +28,165 @@
|
|||||||
/// </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.dataGridView = new System.Windows.Forms.DataGridView();
|
отчётыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.ButtonCreateOrder = new System.Windows.Forms.Button();
|
ComponentToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.ButtonTakeOrderInWork = new System.Windows.Forms.Button();
|
ComponentProductsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.ButtonOrderReady = new System.Windows.Forms.Button();
|
OrdersToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.ButtonIssuedOrder = new System.Windows.Forms.Button();
|
dataGridView = new DataGridView();
|
||||||
this.ButtonRef = new System.Windows.Forms.Button();
|
ButtonCreateOrder = new Button();
|
||||||
this.отчётыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
ButtonTakeOrderInWork = new Button();
|
||||||
this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
ButtonOrderReady = new Button();
|
||||||
this.компонентыПоБлюдамToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
ButtonIssuedOrder = new Button();
|
||||||
this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
ButtonRef = new Button();
|
||||||
this.menuStrip.SuspendLayout();
|
menuStrip.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// menuStrip
|
// menuStrip
|
||||||
//
|
//
|
||||||
this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||||
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(1104, 28);
|
||||||
this.menuStrip.Name = "menuStrip";
|
menuStrip.TabIndex = 0;
|
||||||
this.menuStrip.Size = new System.Drawing.Size(1104, 28);
|
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 });
|
||||||
this.КомпонентыToolStripMenuItem,
|
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||||
this.БлюдаToolStripMenuItem});
|
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
||||||
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
справочникиToolStripMenuItem.Text = "Справочники";
|
||||||
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24);
|
|
||||||
this.справочникиToolStripMenuItem.Text = "Справочники";
|
|
||||||
//
|
//
|
||||||
// КомпонентыToolStripMenuItem
|
// КомпонентыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem";
|
КомпонентыToolStripMenuItem.Name = "КомпонентыToolStripMenuItem";
|
||||||
this.КомпонентыToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
КомпонентыToolStripMenuItem.Size = new Size(182, 26);
|
||||||
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(224, 26);
|
БлюдаToolStripMenuItem.Size = new Size(182, 26);
|
||||||
this.БлюдаToolStripMenuItem.Text = "Блюда";
|
БлюдаToolStripMenuItem.Text = "Блюда";
|
||||||
this.БлюдаToolStripMenuItem.Click += new System.EventHandler(this.ИзделияToolStripMenuItem_Click);
|
БлюдаToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click;
|
||||||
//
|
|
||||||
// dataGridView
|
|
||||||
//
|
|
||||||
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
|
|
||||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
||||||
this.dataGridView.Location = new System.Drawing.Point(0, 40);
|
|
||||||
this.dataGridView.Name = "dataGridView";
|
|
||||||
this.dataGridView.RowHeadersWidth = 51;
|
|
||||||
this.dataGridView.RowTemplate.Height = 29;
|
|
||||||
this.dataGridView.Size = new System.Drawing.Size(798, 408);
|
|
||||||
this.dataGridView.TabIndex = 1;
|
|
||||||
//
|
|
||||||
// ButtonCreateOrder
|
|
||||||
//
|
|
||||||
this.ButtonCreateOrder.Location = new System.Drawing.Point(831, 82);
|
|
||||||
this.ButtonCreateOrder.Name = "ButtonCreateOrder";
|
|
||||||
this.ButtonCreateOrder.Size = new System.Drawing.Size(241, 29);
|
|
||||||
this.ButtonCreateOrder.TabIndex = 2;
|
|
||||||
this.ButtonCreateOrder.Text = "Создать заказ";
|
|
||||||
this.ButtonCreateOrder.UseVisualStyleBackColor = true;
|
|
||||||
this.ButtonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
|
|
||||||
//
|
|
||||||
// ButtonTakeOrderInWork
|
|
||||||
//
|
|
||||||
this.ButtonTakeOrderInWork.Location = new System.Drawing.Point(831, 141);
|
|
||||||
this.ButtonTakeOrderInWork.Name = "ButtonTakeOrderInWork";
|
|
||||||
this.ButtonTakeOrderInWork.Size = new System.Drawing.Size(241, 29);
|
|
||||||
this.ButtonTakeOrderInWork.TabIndex = 3;
|
|
||||||
this.ButtonTakeOrderInWork.Text = "Отдать заказ на выполнение";
|
|
||||||
this.ButtonTakeOrderInWork.UseVisualStyleBackColor = true;
|
|
||||||
this.ButtonTakeOrderInWork.Click += new System.EventHandler(this.ButtonTakeOrderInWork_Click);
|
|
||||||
//
|
|
||||||
// ButtonOrderReady
|
|
||||||
//
|
|
||||||
this.ButtonOrderReady.Location = new System.Drawing.Point(831, 202);
|
|
||||||
this.ButtonOrderReady.Name = "ButtonOrderReady";
|
|
||||||
this.ButtonOrderReady.Size = new System.Drawing.Size(241, 29);
|
|
||||||
this.ButtonOrderReady.TabIndex = 4;
|
|
||||||
this.ButtonOrderReady.Text = "Заказ готов";
|
|
||||||
this.ButtonOrderReady.UseVisualStyleBackColor = true;
|
|
||||||
this.ButtonOrderReady.Click += new System.EventHandler(this.ButtonOrderReady_Click);
|
|
||||||
//
|
|
||||||
// ButtonIssuedOrder
|
|
||||||
//
|
|
||||||
this.ButtonIssuedOrder.Location = new System.Drawing.Point(831, 264);
|
|
||||||
this.ButtonIssuedOrder.Name = "ButtonIssuedOrder";
|
|
||||||
this.ButtonIssuedOrder.Size = new System.Drawing.Size(241, 29);
|
|
||||||
this.ButtonIssuedOrder.TabIndex = 5;
|
|
||||||
this.ButtonIssuedOrder.Text = "Заказ выдан";
|
|
||||||
this.ButtonIssuedOrder.UseVisualStyleBackColor = true;
|
|
||||||
this.ButtonIssuedOrder.Click += new System.EventHandler(this.ButtonIssuedOrder_Click);
|
|
||||||
//
|
|
||||||
// ButtonRef
|
|
||||||
//
|
|
||||||
this.ButtonRef.Location = new System.Drawing.Point(831, 331);
|
|
||||||
this.ButtonRef.Name = "ButtonRef";
|
|
||||||
this.ButtonRef.Size = new System.Drawing.Size(241, 29);
|
|
||||||
this.ButtonRef.TabIndex = 6;
|
|
||||||
this.ButtonRef.Text = "Обновить список";
|
|
||||||
this.ButtonRef.UseVisualStyleBackColor = true;
|
|
||||||
this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
|
|
||||||
//
|
//
|
||||||
// отчётыToolStripMenuItem
|
// отчётыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.отчётыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
отчётыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentToolStripMenuItem, ComponentProductsToolStripMenuItem, OrdersToolStripMenuItem });
|
||||||
this.списокКомпонентовToolStripMenuItem,
|
отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem";
|
||||||
this.компонентыПоБлюдамToolStripMenuItem,
|
отчётыToolStripMenuItem.Size = new Size(73, 24);
|
||||||
this.списокЗаказовToolStripMenuItem});
|
отчётыToolStripMenuItem.Text = "Отчёты";
|
||||||
this.отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem";
|
|
||||||
this.отчётыToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
|
|
||||||
this.отчётыToolStripMenuItem.Text = "Отчёты";
|
|
||||||
//
|
//
|
||||||
// списокКомпонентовToolStripMenuItem
|
// ComponentToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
|
ComponentToolStripMenuItem.Name = "ComponentToolStripMenuItem";
|
||||||
this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(264, 26);
|
ComponentToolStripMenuItem.Size = new Size(264, 26);
|
||||||
this.списокКомпонентовToolStripMenuItem.Text = "Список компонентов";
|
ComponentToolStripMenuItem.Text = "Список блюд";
|
||||||
|
ComponentToolStripMenuItem.Click += ComponentToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// компонентыПоБлюдамToolStripMenuItem
|
// ComponentProductsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.компонентыПоБлюдамToolStripMenuItem.Name = "компонентыПоБлюдамToolStripMenuItem";
|
ComponentProductsToolStripMenuItem.Name = "ComponentProductsToolStripMenuItem";
|
||||||
this.компонентыПоБлюдамToolStripMenuItem.Size = new System.Drawing.Size(264, 26);
|
ComponentProductsToolStripMenuItem.Size = new Size(264, 26);
|
||||||
this.компонентыПоБлюдамToolStripMenuItem.Text = "Компоненты по блюдам";
|
ComponentProductsToolStripMenuItem.Text = "Компоненты по блюдам";
|
||||||
|
ComponentProductsToolStripMenuItem.Click += ComponentProductsToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// списокЗаказовToolStripMenuItem
|
// OrdersToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
|
OrdersToolStripMenuItem.Name = "OrdersToolStripMenuItem";
|
||||||
this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(264, 26);
|
OrdersToolStripMenuItem.Size = new Size(264, 26);
|
||||||
this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
|
OrdersToolStripMenuItem.Text = "Список заказов";
|
||||||
|
OrdersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// dataGridView
|
||||||
|
//
|
||||||
|
dataGridView.BackgroundColor = SystemColors.ControlLightLight;
|
||||||
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridView.Location = new Point(0, 40);
|
||||||
|
dataGridView.Name = "dataGridView";
|
||||||
|
dataGridView.RowHeadersWidth = 51;
|
||||||
|
dataGridView.RowTemplate.Height = 29;
|
||||||
|
dataGridView.Size = new Size(798, 408);
|
||||||
|
dataGridView.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// ButtonCreateOrder
|
||||||
|
//
|
||||||
|
ButtonCreateOrder.Location = new Point(831, 82);
|
||||||
|
ButtonCreateOrder.Name = "ButtonCreateOrder";
|
||||||
|
ButtonCreateOrder.Size = new Size(241, 29);
|
||||||
|
ButtonCreateOrder.TabIndex = 2;
|
||||||
|
ButtonCreateOrder.Text = "Создать заказ";
|
||||||
|
ButtonCreateOrder.UseVisualStyleBackColor = true;
|
||||||
|
ButtonCreateOrder.Click += ButtonCreateOrder_Click;
|
||||||
|
//
|
||||||
|
// ButtonTakeOrderInWork
|
||||||
|
//
|
||||||
|
ButtonTakeOrderInWork.Location = new Point(831, 141);
|
||||||
|
ButtonTakeOrderInWork.Name = "ButtonTakeOrderInWork";
|
||||||
|
ButtonTakeOrderInWork.Size = new Size(241, 29);
|
||||||
|
ButtonTakeOrderInWork.TabIndex = 3;
|
||||||
|
ButtonTakeOrderInWork.Text = "Отдать заказ на выполнение";
|
||||||
|
ButtonTakeOrderInWork.UseVisualStyleBackColor = true;
|
||||||
|
ButtonTakeOrderInWork.Click += ButtonTakeOrderInWork_Click;
|
||||||
|
//
|
||||||
|
// ButtonOrderReady
|
||||||
|
//
|
||||||
|
ButtonOrderReady.Location = new Point(831, 202);
|
||||||
|
ButtonOrderReady.Name = "ButtonOrderReady";
|
||||||
|
ButtonOrderReady.Size = new Size(241, 29);
|
||||||
|
ButtonOrderReady.TabIndex = 4;
|
||||||
|
ButtonOrderReady.Text = "Заказ готов";
|
||||||
|
ButtonOrderReady.UseVisualStyleBackColor = true;
|
||||||
|
ButtonOrderReady.Click += ButtonOrderReady_Click;
|
||||||
|
//
|
||||||
|
// ButtonIssuedOrder
|
||||||
|
//
|
||||||
|
ButtonIssuedOrder.Location = new Point(831, 264);
|
||||||
|
ButtonIssuedOrder.Name = "ButtonIssuedOrder";
|
||||||
|
ButtonIssuedOrder.Size = new Size(241, 29);
|
||||||
|
ButtonIssuedOrder.TabIndex = 5;
|
||||||
|
ButtonIssuedOrder.Text = "Заказ выдан";
|
||||||
|
ButtonIssuedOrder.UseVisualStyleBackColor = true;
|
||||||
|
ButtonIssuedOrder.Click += ButtonIssuedOrder_Click;
|
||||||
|
//
|
||||||
|
// ButtonRef
|
||||||
|
//
|
||||||
|
ButtonRef.Location = new Point(831, 331);
|
||||||
|
ButtonRef.Name = "ButtonRef";
|
||||||
|
ButtonRef.Size = new Size(241, 29);
|
||||||
|
ButtonRef.TabIndex = 6;
|
||||||
|
ButtonRef.Text = "Обновить список";
|
||||||
|
ButtonRef.UseVisualStyleBackColor = true;
|
||||||
|
ButtonRef.Click += ButtonRef_Click;
|
||||||
//
|
//
|
||||||
// FormMain
|
// FormMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1104, 470);
|
ClientSize = new Size(1104, 470);
|
||||||
this.Controls.Add(this.ButtonRef);
|
Controls.Add(ButtonRef);
|
||||||
this.Controls.Add(this.ButtonIssuedOrder);
|
Controls.Add(ButtonIssuedOrder);
|
||||||
this.Controls.Add(this.ButtonOrderReady);
|
Controls.Add(ButtonOrderReady);
|
||||||
this.Controls.Add(this.ButtonTakeOrderInWork);
|
Controls.Add(ButtonTakeOrderInWork);
|
||||||
this.Controls.Add(this.ButtonCreateOrder);
|
Controls.Add(ButtonCreateOrder);
|
||||||
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
|
||||||
@ -207,8 +202,8 @@
|
|||||||
private Button ButtonIssuedOrder;
|
private Button ButtonIssuedOrder;
|
||||||
private Button ButtonRef;
|
private Button ButtonRef;
|
||||||
private ToolStripMenuItem отчётыToolStripMenuItem;
|
private ToolStripMenuItem отчётыToolStripMenuItem;
|
||||||
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
|
private ToolStripMenuItem ComponentToolStripMenuItem;
|
||||||
private ToolStripMenuItem компонентыПоБлюдамToolStripMenuItem;
|
private ToolStripMenuItem ComponentProductsToolStripMenuItem;
|
||||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem;
|
private ToolStripMenuItem OrdersToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using AbstractFoodOrdersContracts.BindingModels;
|
using AbstractFoodOrdersBusinessLogic.BusinessLogics;
|
||||||
|
using AbstractFoodOrdersContracts.BindingModels;
|
||||||
using AbstractFoodOrdersContracts.BusinessLogicsContracts;
|
using AbstractFoodOrdersContracts.BusinessLogicsContracts;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
@ -17,11 +18,13 @@ namespace FoodOrders
|
|||||||
{
|
{
|
||||||
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)
|
||||||
{
|
{
|
||||||
@ -80,7 +83,7 @@ namespace FoodOrders
|
|||||||
int id =
|
int id =
|
||||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id);
|
_logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.TakeOrderInWork(new
|
var operationResult = _orderLogic.TakeOrderInWork(new
|
||||||
OrderBindingModel
|
OrderBindingModel
|
||||||
@ -157,5 +160,38 @@ namespace FoodOrders
|
|||||||
{
|
{
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ComponentToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
_reportLogic.SaveComponentsToWordFile(new ReportBindingModel
|
||||||
|
{
|
||||||
|
FileName = dialog.FileName
|
||||||
|
});
|
||||||
|
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ComponentProductsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormReportDishComponents));
|
||||||
|
if (service is FormReportDishComponents form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OrdersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
|
||||||
|
if (service is FormReportOrders form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,81 +28,77 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
dataGridView = new DataGridView();
|
||||||
this.ComponentColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
ButtonSave = new Button();
|
||||||
this.DishColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
DishColumn = new DataGridViewTextBoxColumn();
|
||||||
this.CountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
ComponentColumn = new DataGridViewTextBoxColumn();
|
||||||
this.ButtonSave = new System.Windows.Forms.Button();
|
CountColumn = new DataGridViewTextBoxColumn();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// dataGridView
|
// dataGridView
|
||||||
//
|
//
|
||||||
this.dataGridView.AllowUserToAddRows = false;
|
dataGridView.AllowUserToAddRows = false;
|
||||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
dataGridView.Columns.AddRange(new DataGridViewColumn[] { DishColumn, ComponentColumn, CountColumn });
|
||||||
this.ComponentColumn,
|
dataGridView.Location = new Point(1, 71);
|
||||||
this.DishColumn,
|
dataGridView.Name = "dataGridView";
|
||||||
this.CountColumn});
|
dataGridView.RowHeadersWidth = 51;
|
||||||
this.dataGridView.Location = new System.Drawing.Point(1, 71);
|
dataGridView.RowTemplate.Height = 29;
|
||||||
this.dataGridView.Name = "dataGridView";
|
dataGridView.Size = new Size(797, 378);
|
||||||
this.dataGridView.RowHeadersWidth = 51;
|
dataGridView.TabIndex = 0;
|
||||||
this.dataGridView.RowTemplate.Height = 29;
|
|
||||||
this.dataGridView.Size = new System.Drawing.Size(797, 378);
|
|
||||||
this.dataGridView.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// ComponentColumn
|
|
||||||
//
|
|
||||||
this.ComponentColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
|
||||||
this.ComponentColumn.HeaderText = "Компонент";
|
|
||||||
this.ComponentColumn.MinimumWidth = 6;
|
|
||||||
this.ComponentColumn.Name = "ComponentColumn";
|
|
||||||
//
|
|
||||||
// DishColumn
|
|
||||||
//
|
|
||||||
this.DishColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
|
||||||
this.DishColumn.HeaderText = "Блюдо";
|
|
||||||
this.DishColumn.MinimumWidth = 6;
|
|
||||||
this.DishColumn.Name = "DishColumn";
|
|
||||||
//
|
|
||||||
// CountColumn
|
|
||||||
//
|
|
||||||
this.CountColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
|
||||||
this.CountColumn.HeaderText = "Количество";
|
|
||||||
this.CountColumn.MinimumWidth = 6;
|
|
||||||
this.CountColumn.Name = "CountColumn";
|
|
||||||
//
|
//
|
||||||
// ButtonSave
|
// ButtonSave
|
||||||
//
|
//
|
||||||
this.ButtonSave.Location = new System.Drawing.Point(12, 24);
|
ButtonSave.Location = new Point(12, 24);
|
||||||
this.ButtonSave.Name = "ButtonSave";
|
ButtonSave.Name = "ButtonSave";
|
||||||
this.ButtonSave.Size = new System.Drawing.Size(181, 29);
|
ButtonSave.Size = new Size(181, 29);
|
||||||
this.ButtonSave.TabIndex = 1;
|
ButtonSave.TabIndex = 1;
|
||||||
this.ButtonSave.Text = "Сохранить в Excel";
|
ButtonSave.Text = "Сохранить в Excel";
|
||||||
this.ButtonSave.UseVisualStyleBackColor = true;
|
ButtonSave.UseVisualStyleBackColor = true;
|
||||||
this.ButtonSave.Click += new System.EventHandler(this.ButtonSaveToExcel_Click);
|
ButtonSave.Click += ButtonSaveToExcel_Click;
|
||||||
|
//
|
||||||
|
// DishColumn
|
||||||
|
//
|
||||||
|
DishColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
DishColumn.HeaderText = "Блюдо";
|
||||||
|
DishColumn.MinimumWidth = 6;
|
||||||
|
DishColumn.Name = "DishColumn";
|
||||||
|
//
|
||||||
|
// ComponentColumn
|
||||||
|
//
|
||||||
|
ComponentColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
ComponentColumn.HeaderText = "Компонент";
|
||||||
|
ComponentColumn.MinimumWidth = 6;
|
||||||
|
ComponentColumn.Name = "ComponentColumn";
|
||||||
|
//
|
||||||
|
// CountColumn
|
||||||
|
//
|
||||||
|
CountColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
CountColumn.HeaderText = "Количество";
|
||||||
|
CountColumn.MinimumWidth = 6;
|
||||||
|
CountColumn.Name = "CountColumn";
|
||||||
//
|
//
|
||||||
// FormReportDishComponents
|
// FormReportDishComponents
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
ClientSize = new Size(800, 450);
|
||||||
this.Controls.Add(this.ButtonSave);
|
Controls.Add(ButtonSave);
|
||||||
this.Controls.Add(this.dataGridView);
|
Controls.Add(dataGridView);
|
||||||
this.Name = "FormReportDishComponents";
|
Name = "FormReportDishComponents";
|
||||||
this.Text = "FormReportDishComponents";
|
Text = "FormReportDishComponents";
|
||||||
this.Load += new System.EventHandler(this.FormReportDishComponents_Load);
|
Load += FormReportDishComponents_Load;
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private DataGridView dataGridView;
|
private DataGridView dataGridView;
|
||||||
private DataGridViewTextBoxColumn ComponentColumn;
|
|
||||||
private DataGridViewTextBoxColumn DishColumn;
|
|
||||||
private DataGridViewTextBoxColumn CountColumn;
|
|
||||||
private Button ButtonSave;
|
private Button ButtonSave;
|
||||||
|
private DataGridViewTextBoxColumn DishColumn;
|
||||||
|
private DataGridViewTextBoxColumn ComponentColumn;
|
||||||
|
private DataGridViewTextBoxColumn CountColumn;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,8 +35,8 @@ namespace FoodOrders
|
|||||||
dataGridView.Rows.Clear();
|
dataGridView.Rows.Clear();
|
||||||
foreach (var elem in dict)
|
foreach (var elem in dict)
|
||||||
{
|
{
|
||||||
dataGridView.Rows.Add(new object[] { elem.ComponentName,"", "" });
|
dataGridView.Rows.Add(new object[] { elem.DishName, "", "" });
|
||||||
foreach (var listElem in elem.Dishes)
|
foreach (var listElem in elem.Components)
|
||||||
{
|
{
|
||||||
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
|
dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 });
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ namespace FoodOrders
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Ошибка загрузки списка блюд по компонентам");
|
_logger.LogError(ex, "Ошибка загрузки списка блюд по компонентам");
|
||||||
|
|
||||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
MessageBoxIcon.Error);
|
MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
|
@ -57,10 +57,10 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="ComponentColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="DishColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="DishColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="ComponentColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="CountColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="CountColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
131
FoodOrders/FoodOrders/FormReportOrders.Designer.cs
generated
Normal file
131
FoodOrders/FoodOrders/FormReportOrders.Designer.cs
generated
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
namespace FoodOrders
|
||||||
|
{
|
||||||
|
partial class FormReportOrders
|
||||||
|
{
|
||||||
|
/// <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();
|
||||||
|
label2 = new Label();
|
||||||
|
label1 = new Label();
|
||||||
|
dateTimePickerTo = new DateTimePicker();
|
||||||
|
dateTimePickerFrom = new DateTimePicker();
|
||||||
|
panel.SuspendLayout();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// panel
|
||||||
|
//
|
||||||
|
panel.Controls.Add(ButtonToPdf);
|
||||||
|
panel.Controls.Add(ButtonMake);
|
||||||
|
panel.Controls.Add(label2);
|
||||||
|
panel.Controls.Add(label1);
|
||||||
|
panel.Controls.Add(dateTimePickerTo);
|
||||||
|
panel.Controls.Add(dateTimePickerFrom);
|
||||||
|
panel.Location = new Point(1, 1);
|
||||||
|
panel.Name = "panel";
|
||||||
|
panel.Size = new Size(900, 51);
|
||||||
|
panel.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// ButtonToPdf
|
||||||
|
//
|
||||||
|
ButtonToPdf.Location = new Point(782, 10);
|
||||||
|
ButtonToPdf.Name = "ButtonToPdf";
|
||||||
|
ButtonToPdf.Size = new Size(94, 29);
|
||||||
|
ButtonToPdf.TabIndex = 5;
|
||||||
|
ButtonToPdf.Text = "В pdf";
|
||||||
|
ButtonToPdf.UseVisualStyleBackColor = true;
|
||||||
|
ButtonToPdf.Click += ButtonToPdf_Click;
|
||||||
|
//
|
||||||
|
// ButtonMake
|
||||||
|
//
|
||||||
|
ButtonMake.Location = new Point(628, 9);
|
||||||
|
ButtonMake.Name = "ButtonMake";
|
||||||
|
ButtonMake.Size = new Size(123, 29);
|
||||||
|
ButtonMake.TabIndex = 4;
|
||||||
|
ButtonMake.Text = "Сформировать";
|
||||||
|
ButtonMake.UseVisualStyleBackColor = true;
|
||||||
|
ButtonMake.Click += ButtonMake_Click;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(318, 15);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(27, 20);
|
||||||
|
label2.TabIndex = 3;
|
||||||
|
label2.Text = "по";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
|
label1.Location = new Point(28, 7);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(24, 28);
|
||||||
|
label1.TabIndex = 2;
|
||||||
|
label1.Text = "С";
|
||||||
|
//
|
||||||
|
// dateTimePickerTo
|
||||||
|
//
|
||||||
|
dateTimePickerTo.Location = new Point(351, 11);
|
||||||
|
dateTimePickerTo.Name = "dateTimePickerTo";
|
||||||
|
dateTimePickerTo.Size = new Size(250, 27);
|
||||||
|
dateTimePickerTo.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// dateTimePickerFrom
|
||||||
|
//
|
||||||
|
dateTimePickerFrom.Location = new Point(62, 11);
|
||||||
|
dateTimePickerFrom.Name = "dateTimePickerFrom";
|
||||||
|
dateTimePickerFrom.Size = new Size(250, 27);
|
||||||
|
dateTimePickerFrom.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// FormReportOrders
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(901, 450);
|
||||||
|
Controls.Add(panel);
|
||||||
|
Name = "FormReportOrders";
|
||||||
|
Text = "FormReportOrders";
|
||||||
|
Load += FormReportOrders_Load;
|
||||||
|
panel.ResumeLayout(false);
|
||||||
|
panel.PerformLayout();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Panel panel;
|
||||||
|
private Button ButtonToPdf;
|
||||||
|
private Button ButtonMake;
|
||||||
|
private Label label2;
|
||||||
|
private Label label1;
|
||||||
|
private DateTimePicker dateTimePickerTo;
|
||||||
|
private DateTimePicker dateTimePickerFrom;
|
||||||
|
}
|
||||||
|
}
|
110
FoodOrders/FoodOrders/FormReportOrders.cs
Normal file
110
FoodOrders/FoodOrders/FormReportOrders.cs
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
using AbstractFoodOrdersContracts.BindingModels;
|
||||||
|
using AbstractFoodOrdersContracts.BusinessLogicsContracts;
|
||||||
|
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 FoodOrders
|
||||||
|
{
|
||||||
|
public partial class FormReportOrders : Form
|
||||||
|
{
|
||||||
|
private readonly ReportViewer reportViewer;
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly IReportLogic _logic;
|
||||||
|
|
||||||
|
public FormReportOrders(ILogger<FormReportOrders> logger, IReportLogic logic)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_logger = logger;
|
||||||
|
_logic = logic;
|
||||||
|
reportViewer = new ReportViewer { Dock = DockStyle.Fill };
|
||||||
|
reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open));
|
||||||
|
Controls.Clear();
|
||||||
|
Controls.Add(panel);
|
||||||
|
Controls.Add(reportViewer);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FormReportOrders_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonMake_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Дата начала должна быть меньше даты окончания",
|
||||||
|
"Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dataSource = _logic.GetOrders(new ReportBindingModel
|
||||||
|
{
|
||||||
|
DateFrom = dateTimePickerFrom.Value,
|
||||||
|
DateTo = dateTimePickerTo.Value
|
||||||
|
});
|
||||||
|
var source = new ReportDataSource("DataSetOrders", dataSource);
|
||||||
|
reportViewer.LocalReport.DataSources.Clear();
|
||||||
|
reportViewer.LocalReport.DataSources.Add(source);
|
||||||
|
var parameters = new[] { new ReportParameter("ReportParameterPeriod",
|
||||||
|
$"c {dateTimePickerFrom.Value.ToShortDateString()} по {dateTimePickerTo.Value.ToShortDateString()}") };
|
||||||
|
reportViewer.LocalReport.SetParameters(parameters);
|
||||||
|
reportViewer.RefreshReport();
|
||||||
|
_logger.LogInformation("Загрузка списка заказов на период {From}-{ To}", dateTimePickerFrom.Value.ToShortDateString(),
|
||||||
|
dateTimePickerTo.Value.ToShortDateString());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки списка заказов на период");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonToPdf_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (dateTimePickerFrom.Value.Date >= dateTimePickerTo.Value.Date)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Дата начала должна быть меньше даты окончания",
|
||||||
|
"Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
using var dialog = new SaveFileDialog
|
||||||
|
{
|
||||||
|
Filter = "pdf|*.pdf"
|
||||||
|
};
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logic.SaveOrdersToPdfFile(new ReportBindingModel
|
||||||
|
{
|
||||||
|
FileName = dialog.FileName,
|
||||||
|
DateFrom = dateTimePickerFrom.Value,
|
||||||
|
DateTo = dateTimePickerTo.Value
|
||||||
|
});
|
||||||
|
_logger.LogInformation("Сохранение списка заказов на период { From}-{ To}", dateTimePickerFrom.Value.ToShortDateString(),
|
||||||
|
dateTimePickerTo.Value.ToShortDateString());
|
||||||
|
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка сохранения списка заказов на период");
|
||||||
|
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
FoodOrders/FoodOrders/FormReportOrders.resx
Normal file
60
FoodOrders/FoodOrders/FormReportOrders.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>
|
@ -1,4 +1,6 @@
|
|||||||
using AbstractFoodOrdersBusinessLogic.BusinessLogics;
|
using AbstractFoodOrdersBusinessLogic.BusinessLogics;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage.Implements;
|
||||||
|
using AbstractFoodOrdersBusinessLogic.OfficePackage;
|
||||||
using AbstractFoodOrdersContracts.BusinessLogicsContracts;
|
using AbstractFoodOrdersContracts.BusinessLogicsContracts;
|
||||||
using AbstractFoodOrdersContracts.StoragesContracts;
|
using AbstractFoodOrdersContracts.StoragesContracts;
|
||||||
using AbstractFoodOrdersDatabaseImplement.Implements;
|
using AbstractFoodOrdersDatabaseImplement.Implements;
|
||||||
@ -40,6 +42,10 @@ namespace FoodOrders
|
|||||||
services.AddTransient<IComponentLogic, ComponentLogic>();
|
services.AddTransient<IComponentLogic, ComponentLogic>();
|
||||||
services.AddTransient<IOrderLogic, OrderLogic>();
|
services.AddTransient<IOrderLogic, OrderLogic>();
|
||||||
services.AddTransient<IDishLogic, DishLogic>();
|
services.AddTransient<IDishLogic, DishLogic>();
|
||||||
|
services.AddTransient<IReportLogic, ReportLogic>();
|
||||||
|
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
||||||
|
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
||||||
|
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
|
||||||
services.AddTransient<FormMain>();
|
services.AddTransient<FormMain>();
|
||||||
services.AddTransient<FormComponent>();
|
services.AddTransient<FormComponent>();
|
||||||
services.AddTransient<FormComponents>();
|
services.AddTransient<FormComponents>();
|
||||||
@ -47,7 +53,8 @@ namespace FoodOrders
|
|||||||
services.AddTransient<FormDish>();
|
services.AddTransient<FormDish>();
|
||||||
services.AddTransient<FormDishComponent>();
|
services.AddTransient<FormDishComponent>();
|
||||||
services.AddTransient<FormDishes>();
|
services.AddTransient<FormDishes>();
|
||||||
|
services.AddTransient<FormReportDishComponents>();
|
||||||
|
services.AddTransient<FormReportOrders>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
This file is automatically generated by Visual Studio .Net. It is
|
|
||||||
used to store generic object data source configuration information.
|
|
||||||
Renaming the file extension or editing the content of this file may
|
|
||||||
cause the file to be unrecognizable by the program.
|
|
||||||
-->
|
|
||||||
<GenericObjectDataSource DisplayName="IDishLogic" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
|
||||||
<TypeInfo>AbstractFoodOrdersContracts.BusinessLogicsContracts.IDishLogic, AbstractFoodOrdersContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
|
||||||
</GenericObjectDataSource>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
This file is automatically generated by Visual Studio .Net. It is
|
|
||||||
used to store generic object data source configuration information.
|
|
||||||
Renaming the file extension or editing the content of this file may
|
|
||||||
cause the file to be unrecognizable by the program.
|
|
||||||
-->
|
|
||||||
<GenericObjectDataSource DisplayName="IOrderLogic" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
|
||||||
<TypeInfo>AbstractFoodOrdersContracts.BusinessLogicsContracts.IOrderLogic, AbstractFoodOrdersContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
|
||||||
</GenericObjectDataSource>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
This file is automatically generated by Visual Studio .Net. It is
|
|
||||||
used to store generic object data source configuration information.
|
|
||||||
Renaming the file extension or editing the content of this file may
|
|
||||||
cause the file to be unrecognizable by the program.
|
|
||||||
-->
|
|
||||||
<GenericObjectDataSource DisplayName="IComponentStorage" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
|
||||||
<TypeInfo>AbstractFoodOrdersContracts.StoragesContracts.IComponentStorage, AbstractFoodOrdersContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
|
||||||
</GenericObjectDataSource>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
This file is automatically generated by Visual Studio .Net. It is
|
|
||||||
used to store generic object data source configuration information.
|
|
||||||
Renaming the file extension or editing the content of this file may
|
|
||||||
cause the file to be unrecognizable by the program.
|
|
||||||
-->
|
|
||||||
<GenericObjectDataSource DisplayName="IDishStorage" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
|
||||||
<TypeInfo>AbstractFoodOrdersContracts.StoragesContracts.IDishStorage, AbstractFoodOrdersContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
|
||||||
</GenericObjectDataSource>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
This file is automatically generated by Visual Studio .Net. It is
|
|
||||||
used to store generic object data source configuration information.
|
|
||||||
Renaming the file extension or editing the content of this file may
|
|
||||||
cause the file to be unrecognizable by the program.
|
|
||||||
-->
|
|
||||||
<GenericObjectDataSource DisplayName="IOrderStorage" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
|
||||||
<TypeInfo>AbstractFoodOrdersContracts.StoragesContracts.IOrderStorage, AbstractFoodOrdersContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
|
||||||
</GenericObjectDataSource>
|
|
@ -1,11 +1,55 @@
|
|||||||
<?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>
|
||||||
|
<DataSources>
|
||||||
|
<DataSource Name="AbstractFoodOrdersContractsViewModels">
|
||||||
|
<ConnectionProperties>
|
||||||
|
<DataProvider>System.Data.DataSet</DataProvider>
|
||||||
|
<ConnectString>/* Local Connection */</ConnectString>
|
||||||
|
</ConnectionProperties>
|
||||||
|
<rd:DataSourceID>10791c83-cee8-4a38-bbd0-245fc17cefb3</rd:DataSourceID>
|
||||||
|
</DataSource>
|
||||||
|
</DataSources>
|
||||||
|
<DataSets>
|
||||||
|
<DataSet Name="DataSetOrders">
|
||||||
|
<Query>
|
||||||
|
<DataSourceName>AbstractFoodOrdersContractsViewModels</DataSourceName>
|
||||||
|
<CommandText>/* Local Query */</CommandText>
|
||||||
|
</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="DishName">
|
||||||
|
<DataField>DishName</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Sum">
|
||||||
|
<DataField>Sum</DataField>
|
||||||
|
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Status">
|
||||||
|
<DataField>Status</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
</Fields>
|
||||||
|
<rd:DataSetInfo>
|
||||||
|
<rd:DataSetName>AbstractFoodOrdersContracts.ViewModels</rd:DataSetName>
|
||||||
|
<rd:TableName>ReportOrdersViewModel</rd:TableName>
|
||||||
|
<rd:ObjectDataSourceType>AbstractFoodOrdersContracts.ViewModels.ReportOrdersViewModel, AbstractFoodOrdersContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
|
||||||
|
</rd:DataSetInfo>
|
||||||
|
</DataSet>
|
||||||
|
</DataSets>
|
||||||
<ReportSections>
|
<ReportSections>
|
||||||
<ReportSection>
|
<ReportSection>
|
||||||
<Body>
|
<Body>
|
||||||
<ReportItems>
|
<ReportItems>
|
||||||
<Textbox Name="Textbox1">
|
<Textbox Name="TextboxTitle">
|
||||||
<CanGrow>true</CanGrow>
|
<CanGrow>true</CanGrow>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
@ -13,10 +57,7 @@
|
|||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Заказы</Value>
|
<Value>Заказы</Value>
|
||||||
<Style>
|
<Style />
|
||||||
<FontSize>16pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style>
|
<Style>
|
||||||
@ -24,14 +65,13 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
<Height>0.6cm</Height>
|
||||||
<Top>0.33867cm</Top>
|
|
||||||
<Height>0.88787cm</Height>
|
|
||||||
<Width>16.51cm</Width>
|
<Width>16.51cm</Width>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
</Border>
|
</Border>
|
||||||
|
<VerticalAlign>Middle</VerticalAlign>
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
<PaddingRight>2pt</PaddingRight>
|
<PaddingRight>2pt</PaddingRight>
|
||||||
<PaddingTop>2pt</PaddingTop>
|
<PaddingTop>2pt</PaddingTop>
|
||||||
@ -55,10 +95,431 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>ReportParameterPeriod</rd:DefaultName>
|
<rd:DefaultName>ReportParameterPeriod</rd:DefaultName>
|
||||||
<Top>1.33237cm</Top>
|
<Top>0.6cm</Top>
|
||||||
<Height>0.77639cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>16.51cm</Width>
|
<Width>16.51cm</Width>
|
||||||
<ZIndex>1</ZIndex>
|
<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="Tablix">
|
||||||
|
<TablixBody>
|
||||||
|
<TablixColumns>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>2.60583cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>4.04517cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>4.8495cm</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="TextboxId">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Номер</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<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="TextboxDateCreate">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Дата создания</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<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="TextboxDishName">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Блюдо</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<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 />
|
||||||
|
</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="TextboxSum">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Сумма</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<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 />
|
||||||
|
</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="DishName">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!DishName.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>DishName</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="Status1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Status.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Status1</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>1.9177cm</Top>
|
||||||
|
<Left>0.79267cm</Left>
|
||||||
|
<Height>1.2cm</Height>
|
||||||
|
<Width>16.5005cm</Width>
|
||||||
|
<ZIndex>2</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</Tablix>
|
||||||
|
<Textbox Name="TextboxResout">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Итого:</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<Top>3.46287cm</Top>
|
||||||
|
<Left>11.51cm</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="Textbox10">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Sum(Fields!Sum.Value, "DataSetOrders")</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||||
|
<Top>3.46287cm</Top>
|
||||||
|
<Left>14.01cm</Left>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<Width>2.5cm</Width>
|
||||||
|
<ZIndex>4</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
@ -70,10 +531,10 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<Height>2.425in</Height>
|
<Height>2in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>6.5in</Width>
|
<Width>7.48425in</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageHeight>29.7cm</PageHeight>
|
<PageHeight>29.7cm</PageHeight>
|
||||||
<PageWidth>21cm</PageWidth>
|
<PageWidth>21cm</PageWidth>
|
||||||
|
Loading…
Reference in New Issue
Block a user