Beispiel #1
0
        public long UserLogin(String userName, String password)
        {
            // Create new database object
            spExecution sp = new spExecution();
            sp.SQLConnect();

            // Check if the user name & password are valid
            if (sp.ValidateUser(userName, password) == "1")
            {
                sp.SQLDisconnect(); // Disconnect from SQL
                return NewSessionID(userName);
            }
            else
            {
                sp.SQLDisconnect(); // Disconnect from SQL
                return 0L;
            }
        }
Beispiel #2
0
        public long UserLogin(String userName, String password)
        {
            // Create new database object
            spExecution sp = new spExecution();

            sp.SQLConnect();

            // Check if the user name & password are valid
            if (sp.ValidateUser(userName, password) == "1")
            {
                sp.SQLDisconnect(); // Disconnect from SQL
                return(NewSessionID(userName));
            }
            else
            {
                sp.SQLDisconnect(); // Disconnect from SQL
                return(0L);
            }
        }