public static List <RowsNames> GetRows() { RowsNames rowName = new RowsNames(); List <RowsNames> rowList = new List <RowsNames>(); // int num = 1; for (int i = 0; i <= 1; i++) { rowName = new RowsNames(); rowName.dataCellType = null; rowName.ArrayValue = null; switch (i) { case 0: rowName.nameRow = RowsDatagridExportNames.tipSpec; rowName.numberRow = i; rowName.textRow = "Тип спецификации"; rowName.NullValue = 1; rowName.dataCellType = typeof(DataGridViewComboBoxCell); if (RowsDatagridExportNames.tip != null) { rowName.NullValue = RowsDatagridExportNames.tip[0]; rowName.ArrayValue = RowsDatagridExportNames.tip; } break; case 1: rowName.nameRow = RowsDatagridExportNames.tipVed; rowName.numberRow = i; rowName.textRow = "Тип ведомости"; rowName.dataCellType = typeof(DataGridViewComboBoxCell); if (RowsDatagridExportNames.tip != null) { rowName.NullValue = RowsDatagridExportNames.tip[0]; rowName.ArrayValue = RowsDatagridExportNames.tip; } break; } rowList.Add(rowName); } return(rowList); }
public static List <RowsNames> GetRows() { RowsNames rowName = new RowsNames(); List <RowsNames> rowList = new List <RowsNames>(); int rowShort = 0; int num = 5; for (int i = 0; i <= num; i++) { rowName = new RowsNames(); rowName.dataCellType = null; rowName.ArrayValue = null; rowName.readonlyT = false; switch (i) { case 0: rowName.nameRow = RowsDatagridNamesVidPrivaz.nomerParam; rowName.numberRow = i; rowName.textRow = "Номер параметра"; rowName.redact = false; rowName.dataCellType = typeof(DataGridViewComboBoxCell); break; case 1: rowName.nameRow = RowsDatagridNamesVidPrivaz.tip; rowName.numberRow = i; rowName.textRow = "Тип"; rowName.redact = false; rowName.dataCellType = typeof(DataGridViewComboBoxCell); break; case 2: rowName.nameRow = RowsDatagridNamesVidPrivaz.firstParam; rowName.numberRow = i; rowName.textRow = "Марка"; rowName.redact = false; rowName.dataCellType = typeof(DataGridViewComboBoxCell); break; case 3: rowName.nameRow = RowsDatagridNamesVidPrivaz.secondPAram; rowName.numberRow = i; rowName.textRow = "Дополнительно"; rowName.redact = false; rowName.dataCellType = typeof(DataGridViewComboBoxCell); break; case 4: rowName.nameRow = RowsDatagridNamesVidPrivaz.edIzmPAram; rowName.numberRow = i; rowName.textRow = "Единицы измерения"; rowName.redact = false; rowName.dataCellType = typeof(DataGridViewComboBoxCell); break; case 5: rowName.nameRow = RowsDatagridNamesVidPrivaz.koefEd; rowName.numberRow = i; rowName.textRow = "Коэффициент"; rowName.redact = false; rowName.dataCellType = typeof(DataGridViewTextBoxCell); break; } rowList.Add(rowName); } return(rowList); }