Click here to Skip to main content
15,912,021 members
Home / Discussions / C#
   

C#

 
Questionproblem with https Pin
vamsimohan216-Sep-07 17:59
vamsimohan216-Sep-07 17:59 
AnswerRe: problem with https Pin
Larantz6-Sep-07 20:09
Larantz6-Sep-07 20:09 
QuestionMultiple Language Pin
Adrian Soon6-Sep-07 17:58
Adrian Soon6-Sep-07 17:58 
AnswerRe: Multiple Language Pin
zimbo01016-Sep-07 18:13
zimbo01016-Sep-07 18:13 
AnswerRe: Multiple Language Pin
ankitbhadana6-Sep-07 20:20
ankitbhadana6-Sep-07 20:20 
AnswerRe: Multiple Language Pin
Urs Enzler6-Sep-07 21:16
Urs Enzler6-Sep-07 21:16 
GeneralRe: Multiple Language Pin
Rudolf Jan7-Sep-07 0:34
Rudolf Jan7-Sep-07 0:34 
GeneralRe: Multiple Language Pin
Urs Enzler7-Sep-07 0:43
Urs Enzler7-Sep-07 0:43 
QuestionPassword Protected IE Pin
zimbo01016-Sep-07 17:46
zimbo01016-Sep-07 17:46 
AnswerRe: Password Protected IE Pin
Biju Sam6-Sep-07 21:17
Biju Sam6-Sep-07 21:17 
Questionhow to track an user with in an application Pin
prasadbuddhika6-Sep-07 17:44
prasadbuddhika6-Sep-07 17:44 
AnswerRe: how to track an user with in an application Pin
zimbo01016-Sep-07 17:58
zimbo01016-Sep-07 17:58 
AnswerRe: how to track an user with in an application Pin
rah_sin6-Sep-07 18:39
professionalrah_sin6-Sep-07 18:39 
GeneralRe: how to track an user with in an application Pin
prasadbuddhika7-Sep-07 0:10
prasadbuddhika7-Sep-07 0:10 
QuestionHow to get FTP Server's directory name. Pin
G.I Cho6-Sep-07 16:23
G.I Cho6-Sep-07 16:23 
AnswerRe: How to get FTP Server's directory name. Pin
ChrisKo7-Sep-07 11:42
ChrisKo7-Sep-07 11:42 
QuestionSetting checkedlist box from sql querie Pin
falles016-Sep-07 14:17
falles016-Sep-07 14:17 
AnswerRe: Setting checkedlist box from sql querie Pin
Larantz6-Sep-07 20:29
Larantz6-Sep-07 20:29 
GeneralRe: Setting checkedlist box from sql querie Pin
falles0110-Sep-07 13:33
falles0110-Sep-07 13:33 
GeneralRe: Setting checkedlist box from sql querie Pin
Larantz12-Sep-07 11:03
Larantz12-Sep-07 11:03 
First of all you should decide whether you want the TechnicalSkillsID as a column in the employees table - as you have now. If you keep it that way, and you want one empolyee to be able to own several TechnicalSkills, you'll have to store several ID's with a separating value.

A better approach, if you ask me, would be to remove the TechnicalSkillsID column from the employee table entirely, and rather create a TechnicalSkills table which uses the employeeID as a keyvalue. Then add one boolean column per technical skill that you want available.

You could then use the column name as a the name of the CheckedListBoxItem and set the Checked property according to the value from the database.

I'll write an example of the latter one:
Create a query for retrieving the row from the TechnicalSkill table with a employeeID equal to the employee you want to configure skills for.
Code for propagating and setting the value for CheckedListBoxItems:

... generate and execute the query for returning the techskills for the given employee
DataTable techSkillsTable = myDataSet.Tables[0];

//Query should return only one row, but we'll go with a foreach
foreach(DataRow row in techSkillsTable.Rows)
{
    foreach (DataColumn column in techSkillsTable.Columns)
    {
        string techSkillName = column.ColumnName;
        bool userHasSkill = false;

        try
        {
            userHasSkill = Convert.ToBoolean(row[column]);
        }
        catch
        {
            //Do nothing here as userHasSkill is initialized to false.
        }

        techSkillsListBox.Items.Add(techSkillName, userHasSkill);
    }
}


Hope it can be of some help.
Best regards!

-Larantz-



for those about to code, we salute you
http://www.itverket.no

Please refer to the Forum Guidelines for appropriate posting.

QuestionStrange Oracle error after migration Pin
Muammar©6-Sep-07 12:27
Muammar©6-Sep-07 12:27 
AnswerRe: how to check whether the data allready exists in the sqlserver database Pin
Pete O'Hanlon6-Sep-07 11:46
mvePete O'Hanlon6-Sep-07 11:46 
GeneralRe: how to check whether the data allready exists in the sqlserver database Pin
Larantz6-Sep-07 12:23
Larantz6-Sep-07 12:23 
GeneralRe: how to check whether the data allready exists in the sqlserver database Pin
Pete O'Hanlon6-Sep-07 21:58
mvePete O'Hanlon6-Sep-07 21:58 
QuestionImage manipulation application [modified] Pin
DanB19836-Sep-07 10:08
DanB19836-Sep-07 10:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.