Си диез / Говнокод #804 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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 guest, (Updated )

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

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

Семь раз отмерь — один отрежь, guest!

    А не использовать ли нам bbcode?

    ↑
    8

    ↓