Beispiel #1
0
        private void LoadUserFunctions()
        {
            try
            {
                _Administration              = false;
                _Backup                      = false;
                _CheckObjectOutDevelopment   = false;
                _CheckObjectOutPreProduction = false;
                _CheckObjectOutProduction    = false;
                _CheckObjectOutUAT           = false;
                _ProjectMaintenance          = false;
                _ReleasePreProduction        = false;
                _ReleaseProduction           = false;
                _ReleaseUAT                  = false;
                _RestoreDevelopment          = false;
                _RestorePreProduction        = false;
                _RestoreProduction           = false;
                _RestoreUAT                  = false;
                _CheckOutOverride            = false;
                _QuickRelease                = false;
                _ApproverFinal               = false;
                _ApproverTesting             = false;

                using (DataStuff sn = new DataStuff())
                {
                    DataTable dt = sn.GetUserFunctions(UserID);

                    if (dt.Rows.Count > 0)
                    {
                        foreach (DataRow row in dt.Rows)
                        {
                            switch (row["FunctionName"].ToString())
                            {
                            case "Administration":
                                _Administration = true;
                                break;

                            case "Backup":
                                _Backup = true;
                                break;

                            case "Check Object Out Development":
                                _CheckObjectOutDevelopment = true;
                                break;

                            case "Check Object Out UAT":
                                _CheckObjectOutUAT = true;
                                break;

                            case "Check Object Out Pre-Production":
                                _CheckObjectOutPreProduction = true;
                                break;

                            case "Check Object Out Production":
                                _CheckObjectOutProduction = true;
                                break;

                            case "Check Out Override":
                                _CheckOutOverride = true;
                                break;

                            case "Project Maintenance":
                                _ProjectMaintenance = true;
                                break;

                            case "Release to Pre-Production":
                                _ReleasePreProduction = true;
                                break;

                            case "Release to Production":
                                _ReleaseProduction = true;
                                break;

                            case "Quick Release":
                                _QuickRelease = true;
                                break;

                            case "Release to UAT":
                                _ReleaseUAT = true;
                                break;

                            case "Restore Development":
                                _RestoreDevelopment = true;
                                break;

                            case "Restore Pre-Production":
                                _RestorePreProduction = true;
                                break;

                            case "Restore Production":
                                _RestoreProduction = true;
                                break;

                            case "Restore UAT":
                                _RestoreUAT = true;
                                break;

                            case "Approve Testing":
                                _ApproverTesting = true;
                                break;

                            case "Approve Final":
                                _ApproverFinal = true;
                                break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }

            catch
            {
            }
        }