Ejemplo n.º 1
0
        /// <summary>
        /// Sends the login information to the bus
        /// </summary>
        /// <param name="request">The request to be sent to the service bus containg the necessary information</param>
        /// <returns>The response from the bus</returns>
        public static ServiceBusResponse sendLogIn(LogInRequest request)
        {
            ServiceBusConnection newConnection = new ServiceBusConnection(request.username);

            ServiceBusResponse response = newConnection.sendLogIn(request);

            if (response.result == true)
            {
                addConnection(request.username, newConnection);
                Globals.setUser(request.username);
            }
            else
            {
                newConnection.close();
            }

            return(response);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sends the login information to the bus
        /// </summary>
        /// <param name="request">The request to be sent to the service bus containg the necessary information</param>
        /// <returns>The response from the bus</returns>
        public static ServiceBusResponse sendLogIn(LogInRequest request)
        {
            ServiceBusConnection newConnection = new ServiceBusConnection(request.username);

            ServiceBusResponse response = newConnection.sendLogIn(request);

            if (response.result == true)
            {
                addConnection(request.username, newConnection);
                Globals.setUser(request.username);
                response.response = "Login Successful";
            }
            else
            {
                newConnection.close();
                response.response = "Incorrect Username and/or Password";
            }

            return(response);
        }