Example #1
0
        /// <summary>
        /// Validating if user is valid or not
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public static bool IsValid(string username, string password)
        {
            UserAccountConcrete _service = new UserAccountConcrete();

            if (_service.IsValid(username, password))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        public MDTTransactionInfo Login(UserLogin userLogin)
        {
            UserAccountConcrete _service = new UserAccountConcrete();
            Logger Log = new Logger();

            try
            {
                Log.WriteErrorLog("I: " + "<br/>" + Environment.NewLine + "Logged in with user :"******"" + Environment.NewLine);
                Log.WriteErrorLog(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine);

                return(_service.Login(userLogin));
            }
            catch (Exception ex)
            {
                Log.WriteErrorLog(ex.Message + "<br/>" + Environment.NewLine + "StackTrace :" + ex.StackTrace +
                                  "" + Environment.NewLine);
                Log.WriteErrorLog(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine);

                return(new MDTTransactionInfo {
                    msgCode = MessageCode.Failed, message = ex.Message, status = HttpStatusCode.InternalServerError
                });
            }
        }