1. Список говнокодов пользователя VMcL

    Всего: 1

  2. C# / Говнокод #1647

    +135.1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    if ((Owner as Form1).ZakazdataGrid.Columns.Count == 0)
                {
                    (Owner as Form1).ZakazdataGrid.Columns.Add("KodTov", "");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("NazvaTov", "Товар");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("Kolvo", "Кол-во");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("NazvaEd", "Ед.");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("Suma", "Сумма");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("KolEd", "");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("Sostavnoy", "");
                    (Owner as Form1).ZakazdataGrid.Columns.Add("Sostav", "");
                    (Owner as Form1).ZakazdataGrid.Columns["Sostavnoy"].Visible = false;
                    (Owner as Form1).ZakazdataGrid.Columns["Sostav"].Visible = false;
                    (Owner as Form1).ZakazdataGrid.Columns["KodTov"].Visible = false;
                    (Owner as Form1).ZakazdataGrid.Columns["KolEd"].Visible = false;
                    (Owner as Form1).ZakazdataGrid.Columns["NazvaTov"].Width = (int)((Owner as Form1).ZakazdataGrid.Width * 0.5);
                    (Owner as Form1).ZakazdataGrid.Columns["NazvaTov"].SortMode = DataGridViewColumnSortMode.NotSortable;
                    (Owner as Form1).ZakazdataGrid.Columns["Kolvo"].Width = (int)((Owner as Form1).ZakazdataGrid.Width * 0.15);
                    (Owner as Form1).ZakazdataGrid.Columns["Kolvo"].SortMode = DataGridViewColumnSortMode.NotSortable;
                    (Owner as Form1).ZakazdataGrid.Columns["NazvaEd"].Width = (int)((Owner as Form1).ZakazdataGrid.Width * 0.15);
                    (Owner as Form1).ZakazdataGrid.Columns["NazvaEd"].SortMode = DataGridViewColumnSortMode.NotSortable;
                    (Owner as Form1).ZakazdataGrid.Columns["Suma"].Width = (int)((Owner as Form1).ZakazdataGrid.Width * 0.2);
                    (Owner as Form1).ZakazdataGrid.Columns["Suma"].SortMode = DataGridViewColumnSortMode.NotSortable;
                    (Owner as Form1).ZakazdataGrid.RowsDefaultCellStyle.Font = new Font("Times New Roman", FontSize - 5);
                    (Owner as Form1).ZakazdataGrid.ColumnHeadersDefaultCellStyle.Font = new Font("Times New Roman", FontSize - 5);
                    (Owner as Form1).ZakazdataGrid.AlternatingRowsDefaultCellStyle.BackColor = Color.PowderBlue;
                    (Owner as Form1).ZakazdataGrid.RowsDefaultCellStyle.BackColor = Color.LightSkyBlue;
                }

    Отсюда: http://sql.ru/forum/actualthread.aspx?tid=688754
    :-)

    VMcL, 21 Августа 2009

    Комментарии (9)