Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Guys

I am currently in the process of writing a small app to allow users to administer a small part of the company application that we use. the application is responsible for managing sites and what equipment is on the sites.

When ever a new site is added the requests come to me and i need to remove this from my workload as it is something that i feel those who manage the sites should be able to do.

we have a customer profile table in SQL which holds the site details, then we have another table linked by CustID which holds all the information of what is on the sites.

Now here is what i need to do:
lets say in a default template table i store for customer A the following values as defaults for what the site can have but does not necessarily have all the items
* keyboard (CI)
* mouse (CI)
* monitor (CI)

and customer B has
* Keyboard (CI)
* mouse (CI)
* Monitor (CI)
* Scanner (CI)

Now when adding a site we will first add the site into the profile table done via another form and then we will go and add the products on this site. we will select the company AKA site A and the store AKA "southern Store" and we will add the Customer Items (CI's) for the site which is Keyboard mouse ETC.

there is a company column in the default CI table to know what CI's they company supports or has

Issues that i need help with:

1) Now i need to load from the SQL Database all the CI's from the Default table and then based on what is selected i will add them to the site in the CI table which is linked to the profile table on the Customer ID.

2) lets say that at a later date the customer bought a scanner now i need to add only that CI. Now when the site is new there will be no other CI items for it but when i need to update the site with 1 or more CI items when there already exists others i need to be able to compare the default set list with those that are already added to the site. to ensure that i will not have duplicate entries. in some cases i will have 2 PC's and i will want to add them as PC 1 and PC2 however the CI will just be PC and i will need to allow for this to work as well but i will also allow that we create default items for PC1 and PC2 in the default table.

when adding CI's to the DefaultCI table it will be done in another form within the same application as well as deleting Items will be done through another form.

I currently have my form setup that i select the company from a combobox and on the selected item it builds a list of sites for the company in another combobox which i select the site from and then it displays the details from the site and below it i will have my CI's(Customer Items)

Now firstly i wanted to know if it would be better to create dynamic checkboxs for the items in the using a while loop like while SQLreader.read is true generated Check boxes in a panel that show what is on the site and then in another panel what items are available and not on the site hence i would need to compared data from the Default CI table and Customer CI table to ensure that the CI's that exist are not generated again for the available panel.

or

to use a datagrid to pull the items into a table and based on what is checked add those and those that already exist for the site just disable them and grey them out

i studied programing but straight out of college i went into server administration so i am really rusty in my C# and would appreciate the communities help with this issue.

Do note that i have already created the forms for adding and editing the sites i just need to work out how to manage these CI items and i will be good to go.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900