Example #1
0
        /// <summary>
        /// Returns an OCL.User object when supplied the user's credentials: LoginName and Password.
        /// This functions is identical to GetUserByCredentials and remains a part of this class for
        /// compatibility with older services. New Programs should use GetUserByCredientials.
        /// </summary>
        /// <param name="LoginName"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public User Login(string LoginName, string Password)
        {
            try
            {
                Functions F = new Functions();

                //Check to see if Login is valid and Fill User

                OCL.User U = null;
                U = F.GetUser(LoginName,Password);

                if(U == null)
                {
                    throw new ApplicationException("Invalid Login Name or Password!");
                }
                return U;
            }
            catch(Exception Err)
            {
                throw new Exception(Err.Message,Err.InnerException);
            }
        }
Example #2
0
        /// <summary>
        /// /// Returns an OCL.User object when supplied the user's credentials: CardNumber.
        /// This functions is identical to GetUserByCardNumber and remains a part of this class for
        /// compatibility with older services. New Programs should use GetUserByCardNumber.
        /// </summary>
        /// <param name="CardNumber"></param>
        /// <returns></returns>
        public User Login(string CardNumber)
        {
            try
            {
                User TempUser = null;
                Functions F =new Functions();
                //Check to see if Login is valid and Fill User

                TempUser = F.GetUser(CardNumber);
                if(TempUser == null)
                    throw new ApplicationException("Invalid Card detected");

                return Login(TempUser.LoginName,TempUser.Password);

            }
            catch(Exception Err)
            {
                throw new ApplicationException(Err.Message);
            }
        }
Example #3
0
        public User GetUserByCardNumberRaw(string CardNumber)
        {
            string FCardNumber = FormatCardNumber(CardNumber);
            Functions F = new Functions();
            User U = F.GetUser(FCardNumber);

            return U;
        }
Example #4
0
 public User GetUserById(int Id)
 {
     Functions F = new Functions();
     User U = F.GetUser(Id);
     return U;
 }
Example #5
0
        public User GetUserByCardNumber(string CardNumber)
        {
            Functions F = new Functions();
            User U = F.GetUser(CardNumber);

            return U;
        }