DotNetInvoice Forums

DotNetInvoice Invoicing Script Discussion Forum
Welcome to DotNetInvoice Forums Sign in | Join | Help
in Search

Client Integration

Last post 05-03-2008, 12:09 PM by support. 2 replies.
Sort Posts: Previous Next
  •  04-23-2008, 6:59 AM 262

    Client Integration

    Hello,

     I'm trying to integrate dotnetinvoice into our system. I've set it up so that when users register through our registration page I call  the 'dni_clients_update' stored procedure to add them to the dotnetinvoice system. This adds them to the system and we can see them fine through the /admin portion of the web site. However, if you try and login as that user through the client login, I get an error trying to login as that user. I noticed that ASPNET roles are being used and was wondering what else I need to do to give clients the ability to be able to login.

     Thanks!

     David

  •  05-01-2008, 3:57 PM 267 in reply to 262

    Re: Client Integration

     

    Hi,

    Did you get a resolution to this. I'm trying to do the same thing.

    A new user needs to be created, but I don't think calling  aspnet_Users_CreateUsers is enough. i think you have to go through MembershipProvider

    Also, some functionality does'nt work if the UserID field is not filled in the clients table. 

     

     

  •  05-03-2008, 12:09 PM 274 in reply to 262

    Re: Client Integration

    David,

    The code for what you are trying to do is below, as well as in /admin/client/edit.aspx.vb around line 150:

                Membership.CreateUser(email.Text, password.Text, email.Text)

                'save its profile in dni_clients table
                Dim prof As ProfileCommon = Profile.GetProfile(email.Text)

                prof.first_name = first_name.Text
                prof.last_name = last_name.Text
                prof.address1 = address1.Text
                prof.address2 = address2.Text
                prof.city = city.Text
                prof.state = state.Text
                prof.postal_code = postal_code.Text
                prof.telephone = telephone.Text
                prof.account_number = account_number.Text
                prof.notes = notes.Text
                prof.company = company.Text
                prof.dni_status_id = dni_status_id.SelectedValue
                prof.email = email.Text
                prof.alternate_email = alternate_email.Text


                'save profile
                prof.Save()

                'add user to client role
                Roles.AddUserToRole(email.Text, constants.role_client)

    If you run into problems feel free to email us directly at support@dotnetinvoice.com. 


    ---
    Rob
    DotNetInvoice Support
View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems