Beispiel #1
0
        public int CheckLogin(BeLogin a) //Login Info Checker
        {
            if ((a.LoginPassword == obj2.GetPass()) && (a.LoginName == "admin"))
            {
                FormsAuthentication.SetAuthCookie(a.LoginPassword, true);
                return(1);
            }

            else if ((a.LoginPassword == obj2.GetPass()) && (a.LoginName != "admin"))
            {
                return(2);
            }

            else if ((a.LoginPassword != obj2.GetPass()) && (a.LoginName == "admin"))
            {
                return(3);
            }

            else if (a.LoginName == "" && a.LoginPassword == "")
            {
                return(0);
            }

            else
            {
                return(-1);
            }
        } /*CHECK COMPLETE*/
Beispiel #2
0
        } //fetching city from table

        public int CheckOldPass(BeChange a)
        {
            if ((a.OldPassword == obj3.GetPass()))
            {
                return(1);
            }

            else
            {
                return(-1);
            }
        } /*CHECK COMPLETE*/