лабораторная 4

This commit is contained in:
ityurner02@mail.ru 2023-03-20 19:32:31 +04:00
parent fc68f68e9b
commit afbe5ce0d8
3 changed files with 14 additions and 14 deletions

View File

@ -30,8 +30,8 @@
{ {
this.ButtonSave = new System.Windows.Forms.Button(); this.ButtonSave = new System.Windows.Forms.Button();
this.dataGridView = new System.Windows.Forms.DataGridView(); this.dataGridView = new System.Windows.Forms.DataGridView();
this.component = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.work = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.work = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.component = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@ -50,8 +50,8 @@
// //
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.component,
this.work, this.work,
this.component,
this.count}); this.count});
this.dataGridView.Location = new System.Drawing.Point(12, 41); this.dataGridView.Location = new System.Drawing.Point(12, 41);
this.dataGridView.Name = "dataGridView"; this.dataGridView.Name = "dataGridView";
@ -59,23 +59,23 @@
this.dataGridView.Size = new System.Drawing.Size(776, 397); this.dataGridView.Size = new System.Drawing.Size(776, 397);
this.dataGridView.TabIndex = 1; this.dataGridView.TabIndex = 1;
// //
// component // work
//
this.component.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.component.HeaderText = "Компонент";
this.component.Name = "component";
//
// sushi
// //
this.work.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.work.HeaderText = "Изделие"; this.work.HeaderText = "Изделие";
this.work.Name = "work"; this.work.Name = "work";
// //
// component
//
this.component.HeaderText = "Компонент";
this.component.Name = "component";
//
// count // count
// //
this.count.HeaderText = "Количество"; this.count.HeaderText = "Количество";
this.count.Name = "count"; this.count.Name = "count";
// //
// FormComponentsOnSushi // FormReportWorkComponents
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@ -94,8 +94,8 @@
private Button ButtonSave; private Button ButtonSave;
private DataGridView dataGridView; private DataGridView dataGridView;
private DataGridViewTextBoxColumn component;
private DataGridViewTextBoxColumn work; private DataGridViewTextBoxColumn work;
private DataGridViewTextBoxColumn component;
private DataGridViewTextBoxColumn count; private DataGridViewTextBoxColumn count;
} }
} }

View File

@ -56,7 +56,7 @@ namespace PlumbingRepairBusinessLogic.OfficePackage
{ {
ColumnName = "A", ColumnName = "A",
RowIndex = rowIndex, RowIndex = rowIndex,
Text = "Total", Text = "Итого",
StyleInfo = ExcelStyleInfoType.Text StyleInfo = ExcelStyleInfoType.Text
}); });
InsertCellInWorksheet(new ExcelCellParameters InsertCellInWorksheet(new ExcelCellParameters

View File

@ -16,14 +16,14 @@ namespace PlumbingRepairBusinessLogic.OfficePackage
}); });
CreateParagraph(new PdfParagraph CreateParagraph(new PdfParagraph
{ {
Text = $"с{info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}", Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}",
Style = "Normal", Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Center ParagraphAlignment = PdfParagraphAlignmentType.Center
}); });
CreateTable(new List<string> { "2cm", "3cm", "6cm", "2cm", "3cm" }); CreateTable(new List<string> { "2cm", "3cm", "6cm", "2cm", "3cm" });
CreateRow(new PdfRowParameters CreateRow(new PdfRowParameters
{ {
Texts = new List<string> { "Id", "Date", "Work", "Status", "Cost" }, Texts = new List<string> { "Номер", "Дата создания", "Изделие", "Статус", "Стоимость" },
Style = "NormalTitle", Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center ParagraphAlignment = PdfParagraphAlignmentType.Center
}); });