Example #1
0
        //To check Role for Add contract.
        //For RPM,FM,CFM,Presales is onle able to ad the contract.
        public static Boolean CheckRolesOnlyViewAddContract()
        {
            ContractRoles contractRoles   = new ContractRoles();
            ArrayList     arrRolesForUser = GetAuthorizeUserRoles();
            Boolean       validUser       = false;

            if (arrRolesForUser.Count >= 1)
            {
                foreach (string STR in arrRolesForUser)
                {
                    switch (STR)
                    {
                    case AuthorizationManagerConstants.ROLECOO:
                        validUser = true;
                        return(validUser);

                    case AuthorizationManagerConstants.ROLECEO:
                        validUser = true;
                        return(validUser);

                    default:
                        break;
                    }
                }
            }
            return(validUser);
        }
Example #2
0
        //To check Role for Contract Summary.
        //For RPM,AM/GPM/APM,FM,CFM,Presales is onle able to see the list.
        //these roles are also used for View  Add contract page.
        public static Boolean CheckRolesContractSummary()
        {
            ContractRoles contractRoles   = new ContractRoles();
            ArrayList     arrRolesForUser = GetAuthorizeUserRoles();
            Boolean       validUser       = false;

            if (arrRolesForUser.Count >= 1)
            {
                foreach (string STR in arrRolesForUser)
                {
                    switch (STR)
                    {
                    case AuthorizationManagerConstants.ROLECEO:
                        validUser = true;
                        return(validUser);

                    //case AuthorizationManagerConstants.ROLEGPM:
                    //    validUser = true;
                    //    return validUser;

                    case AuthorizationManagerConstants.ROLECOO:
                        validUser = true;
                        return(validUser);

                    case AuthorizationManagerConstants.ROLEFM:
                        validUser = true;
                        return(validUser);

                    case AuthorizationManagerConstants.ROLERPM:
                        validUser = true;
                        return(validUser);

                    case AuthorizationManagerConstants.ROLEPRESALES:
                        validUser = true;
                        return(validUser);

                    case AuthorizationManagerConstants.ROLECFM:
                        validUser = true;
                        return(validUser);

                    default:
                        break;
                    }
                }
            }
            return(validUser);
        }