Ejemplo n.º 1
0
        private bool VerifyTeamNumber()
        {
            bool            isValid        = false;
            UtilityFunction utilityHandler = new UtilityFunction(sessionContext, config.StationNumber);
            string          teamNo         = utilityHandler.GetTeamNumberByUser(this.txtUserName.Text.Trim());

            if (string.IsNullOrEmpty(config.AUTH_TEAM))
            {
                isValid = true;
            }
            else if (string.IsNullOrEmpty(teamNo))
            {
                isValid = false;
            }
            else
            {
                if (config.AUTH_TEAM.Contains(teamNo))
                {
                    isValid = true;
                }
            }
            return(isValid);
        }
Ejemplo n.º 2
0
        private bool VerifyTeamNumber()
        {
            bool isValid = true;

            if (config.AUTH_TEAM != "" && config.AUTH_TEAM != null)
            {
                UtilityFunction utilityHandler = new UtilityFunction(sessionContext, config.StationNumber);
                string          teamNo         = utilityHandler.GetTeamNumberByUser(this.txtUserName.Text.Trim());
                if (!string.IsNullOrEmpty(teamNo))
                {
                    if (!config.AUTH_TEAM.Contains(teamNo))
                    {
                        SetStatusLabelText("User Team not authorized", 1);
                        isValid = false;
                    }
                }
                else
                {
                    SetStatusLabelText("User Team not authorized", 1);
                    isValid = false;
                }
            }
            return(isValid);
        }
Ejemplo n.º 3
0
        private bool VerifyTeamNumber()
        {
            bool   isValid           = true;
            string Supervisor        = "";
            string Supervisor_OPTION = "1";
            string IPQC        = "";
            string IPQC_OPTION = "1";

            if (config.AUTH_CHECKLIST_APP_TEAM != "" && config.AUTH_CHECKLIST_APP_TEAM != null)
            {
                string[] teams = config.AUTH_CHECKLIST_APP_TEAM.Split(';');
                string[] items = teams[0].Split(',');
                Supervisor        = items[0];
                Supervisor_OPTION = items[1];
                string[] IPQCitems = teams[1].Split(',');
                IPQC        = IPQCitems[0];
                IPQC_OPTION = IPQCitems[1];
            }
            if (logintype == 0)
            {
                if (config.AUTH_TEAM != "" && config.AUTH_TEAM != null)
                {
                    UtilityFunction utilityHandler = new UtilityFunction(sessionContext, config.StationNumber);
                    string          teamNo         = utilityHandler.GetTeamNumberByUser(this.txtUserName.Text.Trim());
                    if (!string.IsNullOrEmpty(teamNo))
                    {
                        if (!config.AUTH_TEAM.Contains(teamNo))
                        {
                            SetStatusLabelText("User Team not authorized", 1);
                            isValid = false;
                        }
                    }
                    else
                    {
                        SetStatusLabelText("User Team not authorized", 1);
                        isValid = false;
                    }
                }
            }
            else if (logintype == 4)
            {
                if (Supervisor != "" && Supervisor_OPTION == "0")
                {
                    UtilityFunction utilityHandler = new UtilityFunction(sessionContext, config.StationNumber);
                    string          teamNo         = utilityHandler.GetTeamNumberByUser(this.txtUserName.Text.Trim());
                    if (!string.IsNullOrEmpty(teamNo))
                    {
                        if (!Supervisor.Contains(teamNo))
                        {
                            SetStatusLabelText("User Team not authorized", 1);
                            isValid = false;
                        }
                    }
                    else
                    {
                        SetStatusLabelText("User Team not authorized", 1);
                        isValid = false;
                    }
                }
            }
            else if (logintype == 5)
            {
                if (IPQC != "" && IPQC_OPTION == "0")
                {
                    UtilityFunction utilityHandler = new UtilityFunction(sessionContext, config.StationNumber);
                    string          teamNo         = utilityHandler.GetTeamNumberByUser(this.txtUserName.Text.Trim());
                    if (!string.IsNullOrEmpty(teamNo))
                    {
                        if (!IPQC.Contains(teamNo))
                        {
                            SetStatusLabelText("User Team not authorized", 1);
                            isValid = false;
                        }
                    }
                    else
                    {
                        SetStatusLabelText("User Team not authorized", 1);
                        isValid = false;
                    }
                }
            }
            return(isValid);
        }