Esempio n. 1
0
        private void fillUpDataGridWithPcsLaptopsItems(DataGridView dataReport, string nameTable)
        {
            dataReport.Rows.Clear();
            dataReport.Columns.Clear();

            var column1 = new DataGridViewColumn();

            column1.HeaderText   = "Название продукта";
            column1.ReadOnly     = true;
            column1.Name         = "Name";
            column1.CellTemplate = new DataGridViewTextBoxCell();

            var column2 = new DataGridViewColumn();

            column2.HeaderText   = "CPU";
            column2.Name         = "CPU";
            column2.CellTemplate = new DataGridViewTextBoxCell();

            var column3 = new DataGridViewColumn();

            column3.HeaderText   = "RAM";
            column3.Name         = "RAM";
            column3.CellTemplate = new DataGridViewTextBoxCell();

            var column4 = new DataGridViewColumn();

            column4.HeaderText   = "HDD";
            column4.Name         = "HDD";
            column4.CellTemplate = new DataGridViewTextBoxCell();

            var column5 = new DataGridViewColumn();

            column5.HeaderText   = "SSD";
            column5.Name         = "SSD";
            column5.CellTemplate = new DataGridViewTextBoxCell();

            var column6 = new DataGridViewColumn();

            column6.HeaderText   = "GPU";
            column6.Name         = "GPU";
            column6.CellTemplate = new DataGridViewTextBoxCell();

            var column7 = new DataGridViewColumn();

            column7.HeaderText   = "Операционная система";
            column7.Name         = "OS";
            column7.CellTemplate = new DataGridViewTextBoxCell();

            var column8 = new DataGridViewColumn();

            column8.HeaderText   = "Цена";
            column8.Name         = "Price";
            column8.CellTemplate = new DataGridViewTextBoxCell();

            var column9 = new DataGridViewColumn();

            column9.HeaderText   = "Кол-во";
            column9.Name         = "Quantity";
            column9.CellTemplate = new DataGridViewTextBoxCell();

            dataReport.Columns.Add(column1);
            dataReport.Columns.Add(column2);
            dataReport.Columns.Add(column3);
            dataReport.Columns.Add(column4);
            dataReport.Columns.Add(column5);
            dataReport.Columns.Add(column6);
            dataReport.Columns.Add(column7);
            dataReport.Columns.Add(column8);
            dataReport.Columns.Add(column9);

            workServerStore.completePcsLaptopsReport(dataReport, nameTable);
        }