How to add Membership Level select box at join page in boonex - boonex-dolphin

I want to use membership level at join page in boonex.

Related

How to store different sets of user information using ASP.NET MVC Simple Memberships

How do I store different sets of user information using Simple Memberships? For eg. I have two roles (doctors and patients) respectively. The extended user information to be stored for both the roles is somewhat different. Simple Membership creates a UserProfile table by default which I'd like to split into two tables to accomodate the user information for both the roles respectively.
Please suggest if and how this can be achieved.
Thanks.
You have Roles defined in your 'Roles' Table. Then, for a particular User, UserId and RoleId both are associated with each other in another Table named '_UserInRoles'. Now, Create another table maybe Named as 'UserAdditionalInfo' and
make table structure as below
Id(PK)
UserId(FK)
RoleId(FK)
Column1
Column2
Now, you can save user additional data according to its RoleId and UserId in another table and when you need to display User Profile on front end, then may be you can use JOIN in these tables and return information.

MVC with View Model - Create an object optionally

I use MVC with View Models (I create separate View Model for each View).
I have 2 objects; Product and Category; Product can have a category.
I have separate view models (productCreateVM, CategoryCreateVM)
I can create product or category;and user can choose one of current categories while creating a new product, no problem.
What I need to do is that ; users can choose one of current categories or create a new category than choose it, while creating a new product.
If I add CategoryCreateVM in ProductCreateVM, then CategoryCreateVM's mandatory fields need to be filled in, in order the model state to be valid.
but if user already found a category for their product and didnt create a new one; I can not fill all the mandatory fields of CategoryCreateVM.
On the other hand; if user is creating a new category from product create view; then all the validations should be applied (category name lenght etc).
Any suggestions how to approach to this?
If you want to use more complex validations see if http://foolproof.codeplex.com/ will be sufficient.
It it should provide you with the conditional validation you need
You should consider rendering the Create Category View as a partial view within the Create Product View.
Its visibility can be toggled by e.g. the selection of Create Category within a Category drop-down menu.
For example:
#Html.Partial("Category/Create")

How to bind DataTable to DataGridView that consists of a DatagridViewTextBoxColumn and a DataGridViewComboBoxColumn?

I want to ask you a question about my project.
I have a DataGridView in my C# project which has two columns: One is DataGridViewTextBoxColumn, the other is DataGridViewComboBoxColumn.
I have usernames and authorities columns in my DB. Usernames are email addresses like abc#domain.com and authorities are either user or admin.
I want to bind via DataTable usernames to DataGridViewTextBoxColumn and authorities to DataGridViewComboBoxColumn but combo boxes must show usernames' authority by default and also have the option to change it between user and admin.
Thanks for any help.
you can do all you need in the designer ... you just have to put "user" and "admin" in the Items collection of your DataGridViewComboBoxColumn

Magento Collection load for sales order with custom fields

I am new to magento. I have added two text fileds(custom options) for products in magento admin panel.
When the customer purchasing products these two text fields are required. I need to load the collection for sales order to get this two fields.
Customer fields namely like:
1) domain name 2) activation code
Can any one give me guidance? How to get this text fields from magento sales order?
thanks
Below collection will get your products custom fields from sales order
I have tried my self and got the final result.
Note : These products custom fields values entered by the customer in the product details page.
$order = Mage::getModel('sales/order');
$orderItems = $order->getItemsCollection();
$orderItems->addFieldToFilter('product_options',array('like'=>'%'.$domain_name.'%'));
$data = $orderItems->getData();

Ruby on Rails HABTM Multiple Dropdowns with AJAX

I have a typical HABTM relationship between members (actual members of our organization, not all have online accounts) and users (online accounts). I have an edit users page for site administrators where multiple members can be assigned to users.
There are too many members to reasonably use checkboxes or a multi-select dropdown. I have decided to use dropdowns that are added by clicking an "Add Member" button that uses an AJAX function to add a dropdown.
Here's what I have working:
I can add dropdowns and pick any member. On save, the relationships are established.
I can edit that user and add more members, remove members, and change members in the dropdown.
The final piece I am struggling with is having my remove link (next to each member drop down) remove a drop down for a new user. The reason being that the action behind the remove link relies on the id of the div that contains the dropdown. When editing a user, this id is generated based on the selected member. For a new user, I do not know the selected member in the dropdown, so I can't assign it an id that I can know about when the remove link is clicked.
Are dropdowns the way to go? Are there any good tutorials or examples of what I am describing out there? Should I perhaps update the div ID in an onchange event in the dropdown?
I have found that the best way to do this is to use the object_id of member to create a unique div id. My Javascript function is then able to use this to remove the div.

Resources