Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
AnswerRe: Form that is already visible cannot be displayed as a modal Pin
Wendelius23-Jan-09 21:21
mentorWendelius23-Jan-09 21:21 
Answerplease send me replay Pin
waitsunny23-Jan-09 20:52
waitsunny23-Jan-09 20:52 
GeneralRe: please send me replay Pin
Colin Angus Mackay24-Jan-09 1:30
Colin Angus Mackay24-Jan-09 1:30 
QuestionSave Listview data to MSSQL table Pin
Tuntgerhuu23-Jan-09 19:16
Tuntgerhuu23-Jan-09 19:16 
AnswerRe: Save Listview data to MSSQL table Pin
WebMaster26-Jan-09 5:00
WebMaster26-Jan-09 5:00 
QuestionAdd Item In Combobox Pin
jigneshDPatel23-Jan-09 18:39
jigneshDPatel23-Jan-09 18:39 
AnswerRe: Add Item In Combobox Pin
Wendelius23-Jan-09 21:33
mentorWendelius23-Jan-09 21:33 
GeneralRe: Add Item In Combobox Pin
jigneshDPatel23-Jan-09 22:23
jigneshDPatel23-Jan-09 22:23 
1)
public void FillCombo()
{

DataTable dt = new DataTable();
StrSql = "select Level_Id,Level_Name from UserLevel";
StrSql += " where Level_Id = '2'";
dt = qry.FillDataSet(StrSql).Tables[0];
if (dt.Rows.Count > 0)
{
if (ChildExistOrNotInCombo(2) == true)
{
AddChildCombo(2, ref dt);
}
}
this.cmbParentLevel.DataSource = dt;
this.cmbParentLevel.DisplayMember = "Level_Name";
this.cmbParentLevel.ValueMember = "Level_Id";
}

2)


private void AddChildCombo(int objid,ref DataTable Table)
{
DataTable Objdt = new DataTable();
int Objval = 0;
StrSql = "select Level_Id,Level_Name from UserLevel";
StrSql += " where Parent_LevelId = " + objid + "";
Objdt = qry.FillDataSet(StrSql).Tables[0];
if (Objdt.Rows.Count > 0)
{
for ( int i = 0; i <= Objdt.Rows.Count - 1; i++)
{
Table.ImportRow(Objdt.Rows[i]);
Objval = Convert.ToInt32(Objdt.Rows[i].ItemArray[0]);
if (ChildExistOrNotInCombo(Objval) == true)
{
AddChildCombo(Objval, ref Objdt);
}
}
}
}



3)


private bool ChildExistOrNotInCombo(int ObjParentId)
{
StrSql = "select * from userlevel where Parent_LevelId =
" + ObjParentId + "";
if (qry.CheckExist(StrSql) == true)
{
return true;
}
else
{
return false;
}
}


in my database this item has only 12 record but in this that retrun the 77 record in some are wrong but i dont't know please help me on this problem as soon as possible
GeneralRe: Add Item In Combobox Pin
Wendelius23-Jan-09 22:58
mentorWendelius23-Jan-09 22:58 
GeneralRe: Add Item In Combobox Pin
jigneshDPatel23-Jan-09 23:15
jigneshDPatel23-Jan-09 23:15 
GeneralRe: Add Item In Combobox Pin
Wendelius24-Jan-09 0:09
mentorWendelius24-Jan-09 0:09 
GeneralRe: Add Item In Combobox Pin
jigneshDPatel24-Jan-09 0:44
jigneshDPatel24-Jan-09 0:44 
GeneralRe: Add Item In Combobox Pin
Wendelius24-Jan-09 0:58
mentorWendelius24-Jan-09 0:58 
GeneralRe: Add Item In Combobox Pin
jigneshDPatel24-Jan-09 1:22
jigneshDPatel24-Jan-09 1:22 
GeneralRe: Add Item In Combobox Pin
Wendelius24-Jan-09 1:49
mentorWendelius24-Jan-09 1:49 
GeneralRe: Add Item In Combobox Pin
jigneshDPatel27-Jan-09 17:34
jigneshDPatel27-Jan-09 17:34 
GeneralRe: Add Item In Combobox Pin
Wendelius27-Jan-09 19:45
mentorWendelius27-Jan-09 19:45 
QuestionConfig Files Pin
CodingYoshi23-Jan-09 10:59
CodingYoshi23-Jan-09 10:59 
AnswerRe: Config Files Pin
Wendelius23-Jan-09 11:03
mentorWendelius23-Jan-09 11:03 
GeneralRe: Config Files Pin
CodingYoshi23-Jan-09 11:23
CodingYoshi23-Jan-09 11:23 
GeneralRe: Config Files Pin
Not Active23-Jan-09 11:29
mentorNot Active23-Jan-09 11:29 
QuestionActing on an indeterminate checkbox checkstate Pin
Lodeclaw23-Jan-09 10:34
Lodeclaw23-Jan-09 10:34 
AnswerRe: Acting on an indeterminate checkbox checkstate Pin
DaveyM6923-Jan-09 10:38
professionalDaveyM6923-Jan-09 10:38 
GeneralRe: Acting on an indeterminate checkbox checkstate Pin
Lodeclaw23-Jan-09 10:41
Lodeclaw23-Jan-09 10:41 
GeneralRe: Acting on an indeterminate checkbox checkstate Pin
DaveyM6923-Jan-09 10:57
professionalDaveyM6923-Jan-09 10:57 

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.