lab4 passed
This commit is contained in:
parent
73db42e588
commit
3a28b05517
@ -39,16 +39,14 @@ namespace AbstractSoftwareInstallationDatabaseImplement.Implements
|
||||
|
||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
using var context = new AbstractSoftwareInstallationDatabase();
|
||||
|
||||
return context.Orders
|
||||
.Where(x => x.Id == model.Id)
|
||||
.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo)
|
||||
.Include(x => x.Package)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
|
||||
}
|
||||
|
||||
public List<OrderViewModel> GetFullList()
|
||||
|
@ -202,7 +202,6 @@
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.Load += new System.EventHandler(this.FormPackage_Load);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -46,15 +46,16 @@
|
||||
this.panel.Controls.Add(this.buttonCreateReport);
|
||||
this.panel.Controls.Add(this.dateTimePicker2);
|
||||
this.panel.Controls.Add(this.dateTimePicker1);
|
||||
this.panel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel.Name = "panel";
|
||||
this.panel.Size = new System.Drawing.Size(801, 46);
|
||||
this.panel.Size = new System.Drawing.Size(800, 46);
|
||||
this.panel.TabIndex = 0;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(178, 16);
|
||||
this.label2.Location = new System.Drawing.Point(206, 16);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(23, 15);
|
||||
this.label2.TabIndex = 5;
|
||||
@ -71,7 +72,7 @@
|
||||
//
|
||||
// buttonCreateToPdf
|
||||
//
|
||||
this.buttonCreateToPdf.Location = new System.Drawing.Point(667, 12);
|
||||
this.buttonCreateToPdf.Location = new System.Drawing.Point(668, 14);
|
||||
this.buttonCreateToPdf.Name = "buttonCreateToPdf";
|
||||
this.buttonCreateToPdf.Size = new System.Drawing.Size(110, 23);
|
||||
this.buttonCreateToPdf.TabIndex = 3;
|
||||
@ -81,7 +82,7 @@
|
||||
//
|
||||
// buttonCreateReport
|
||||
//
|
||||
this.buttonCreateReport.Location = new System.Drawing.Point(441, 12);
|
||||
this.buttonCreateReport.Location = new System.Drawing.Point(531, 14);
|
||||
this.buttonCreateReport.Name = "buttonCreateReport";
|
||||
this.buttonCreateReport.Size = new System.Drawing.Size(100, 23);
|
||||
this.buttonCreateReport.TabIndex = 2;
|
||||
@ -93,14 +94,14 @@
|
||||
//
|
||||
this.dateTimePicker2.Location = new System.Drawing.Point(256, 12);
|
||||
this.dateTimePicker2.Name = "dateTimePicker2";
|
||||
this.dateTimePicker2.Size = new System.Drawing.Size(92, 23);
|
||||
this.dateTimePicker2.Size = new System.Drawing.Size(141, 23);
|
||||
this.dateTimePicker2.TabIndex = 1;
|
||||
//
|
||||
// dateTimePicker1
|
||||
//
|
||||
this.dateTimePicker1.Location = new System.Drawing.Point(77, 12);
|
||||
this.dateTimePicker1.Location = new System.Drawing.Point(48, 12);
|
||||
this.dateTimePicker1.Name = "dateTimePicker1";
|
||||
this.dateTimePicker1.Size = new System.Drawing.Size(43, 23);
|
||||
this.dateTimePicker1.Size = new System.Drawing.Size(143, 23);
|
||||
this.dateTimePicker1.TabIndex = 0;
|
||||
//
|
||||
// FormReportOrders
|
||||
|
@ -28,7 +28,7 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
Dock = DockStyle.Fill
|
||||
};
|
||||
reportViewer.LocalReport.LoadReportDefinition(new FileStream("C:/Users/Дьявол Смерти/source/repos/PIbd-23_Dolgov_D.A._SoftwareInstallation/SoftwareInstallation/SoftwareInstallation/ReportOrders.rdlc", FileMode.Open));
|
||||
reportViewer.LocalReport.LoadReportDefinition(new FileStream("C:/Users/user/source/repos/PIbd-23_Dolgov_D.A._SoftwareInstallation/SoftwareInstallation/SoftwareInstallation/ReportOrders.rdlc", FileMode.Open));
|
||||
Controls.Clear();
|
||||
Controls.Add(reportViewer);
|
||||
Controls.Add(panel);
|
||||
@ -52,8 +52,9 @@ namespace SoftwareInstallationView
|
||||
var source = new ReportDataSource("DataSetOrders", dataSource);
|
||||
reportViewer.LocalReport.DataSources.Clear();
|
||||
reportViewer.LocalReport.DataSources.Add(source);
|
||||
var parameters = new[] { new ReportParameter("ReportParameterPeriod", $"c{ dateTimePicker1.Value.ToShortDateString()} по {dateTimePicker2.Value.ToShortDateString()}") };
|
||||
var parameters = new[] { new ReportParameter("ReportParameterPeriod", $"c { dateTimePicker1.Value.ToShortDateString()} по {dateTimePicker2.Value.ToShortDateString()}") };
|
||||
reportViewer.LocalReport.SetParameters(parameters);
|
||||
|
||||
reportViewer.RefreshReport();
|
||||
_logger.LogInformation("Загрузка списка заказов на период {From}-{ To}", dateTimePicker1.Value.ToShortDateString(), dateTimePicker2.Value.ToShortDateString());
|
||||
}
|
||||
|
@ -212,7 +212,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Документ</Value>
|
||||
<Value>Пакет</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
|
Loading…
Reference in New Issue
Block a user