This commit is contained in:
Владимир Данилов 2024-04-19 02:04:26 +04:00
parent 678294432f
commit dfc0fb1c1f
2 changed files with 9 additions and 9 deletions

View File

@ -94,8 +94,8 @@
// //
ComponentToolStripMenuItem.Name = "ComponentToolStripMenuItem"; ComponentToolStripMenuItem.Name = "ComponentToolStripMenuItem";
ComponentToolStripMenuItem.Size = new Size(228, 22); ComponentToolStripMenuItem.Size = new Size(228, 22);
ComponentToolStripMenuItem.Text = "Список ремонтов"; ComponentToolStripMenuItem.Text = "Список компонентов";
ComponentToolStripMenuItem.Click += ComponentRepairToolStripMenuItem_Click; ComponentToolStripMenuItem.Click += ComponentToolStripMenuItem_Click;
// //
// ComponentRepairToolStripMenuItem // ComponentRepairToolStripMenuItem
// //

View File

@ -21,7 +21,7 @@ namespace RenovationWorkView
{ {
Dock = DockStyle.Fill Dock = DockStyle.Fill
}; };
reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open)); reportViewer.LocalReport.LoadReportDefinition(new FileStream("C:\\Users\\danil\\source\\repos\\PIbd-21_Danilov_V.V._RenovationWork\\RenovationWork\\RenovationWork\\ReportOrders.rdlc", FileMode.Open));
Controls.Clear(); Controls.Clear();
Controls.Add(reportViewer); Controls.Add(reportViewer);
Controls.Add(panel); Controls.Add(panel);
@ -34,7 +34,7 @@ namespace RenovationWorkView
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
{ {
@ -51,11 +51,11 @@ namespace RenovationWorkView
reportViewer.RefreshReport(); reportViewer.RefreshReport();
_logger.LogInformation("Loading list of orders for period {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString()); _logger.LogInformation("Loading list of orders for period {From}-{To}", dateTimePickerFrom.Value.ToShortDateString(), dateTimePickerTo.Value.ToShortDateString());
} }
catch (Exception ex) //catch (Exception ex)
{ //{
_logger.LogError(ex, "Loading list of orders for period error"); // _logger.LogError(ex, "Loading list of orders for period error");
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)