protected void CreateUserWizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        RealStateDSTableAdapters.aspnet_UsersInRolesTableAdapter adapter = new RealStateDSTableAdapters.aspnet_UsersInRolesTableAdapter();
        string SRoleID = Convert.ToString(adapter.QueryRoleIDByRoleName(this.DropDownList1.SelectedValue));
        string SUserID = Convert.ToString(adapter.QueryUserIDByUserName(this.User.Identity.Name));

        System.Guid UserID = new Guid(SUserID);
        System.Guid RoleID = new Guid(SRoleID);

        adapter.InsertUserInRole(UserID, RoleID);
    }
Beispiel #2
0
    protected void CreateUserWizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        RealStateDSTableAdapters.aspnet_UsersInRolesTableAdapter adapter = new RealStateDSTableAdapters.aspnet_UsersInRolesTableAdapter();
        string SRoleID = Convert.ToString(adapter.QueryRoleIDByRoleName(this.DropDownList1.SelectedValue));
        string SUserID = Convert.ToString(adapter.QueryUserIDByUserName(this.User.Identity.Name));

        System.Guid UserID = new Guid(SUserID);
        System.Guid RoleID = new Guid(SRoleID);

        adapter.InsertUserInRole(UserID, RoleID);
    }