1. C# / Говнокод #804

    +143.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
    28. 28
    29. 29
    30. 30
    if (((HttpContext.Current.Profile as ProfileCommon).Role == "3") || ((HttpContext.Current.Profile as ProfileCommon).Role == "4"))
            {
                if (e.Item.Value == " Add New Trainee ")
                    e.Item.Enabled = false;
                if (e.Item.Value == " Add New Group ")
                    e.Item.Enabled = false;
                if (e.Item.Value == " Audit Log ")
                    e.Item.Enabled = false;
                if (e.Item.Value == " Manage Holidays ")
                    e.Item.Enabled = false;
            }
    
            if ( (( HttpContext.Current.Profile as ProfileCommon).Role != "0") && (( HttpContext.Current.Profile as ProfileCommon).Role != "") )
            {
                if (e.Item.Value == " Manage Users ")
                    e.Item.Enabled = false;
                if (e.Item.Value == " Manage Courses ")
                    e.Item.Enabled = false;
                if (e.Item.Value == " Audit Log ")
                    e.Item.Enabled = false;
            }
            if (((HttpContext.Current.Profile as ProfileCommon).Role == "") ||
                ((HttpContext.Current.Profile as ProfileCommon).Role == "0") ||
                ((HttpContext.Current.Profile as ProfileCommon).Role == "1") ||
                ((HttpContext.Current.Profile as ProfileCommon).Role == "2"))
            {
                if (e.Item.Value == " Holidays ")
                    e.Item.Enabled = false;
    
            }

    Новое место работы. Новые порции говнокода.
    Это классика - no comments...

    Запостил: guest, 02 Апреля 2009

    Комментарии (3) RSS

    Добавить комментарий