Esempio n. 1
0
        public ResultCode LoginUser(LoginModel model)
        {
            DatabaseAccess objDatabaseAccess = new DatabaseAccess();

            DataBaseAccessLayer.ConnectionClass.UserRegistrationModel obj = new DataBaseAccessLayer.ConnectionClass.UserRegistrationModel();
            obj.EmailAddress = model.Email;
            obj.Password     = model.Password;
            return(objDatabaseAccess.LoginUser(obj));
        }
        public DBLayer.ResultCode RegisterUser(UserRegistrationModel modelData)
        {
            DatabaseAccess objDatabaseAccess = new DatabaseAccess();

            DBLayer.UserRegistrationModel obj = new DBLayer.UserRegistrationModel
            {
                FirstName       = modelData.FirstName,
                LastName        = modelData.LastName,
                EmailAddress    = modelData.EmailAddress,
                Password        = modelData.Password,
                ConfirmPassword = modelData.ConfirmPassword,
                UserType        = modelData.UserType.ToString()
            };

            return(objDatabaseAccess.RegisterUser(obj));
        }