Click here to Skip to main content
16,004,854 members
Home / Discussions / C#
   

C#

 
AnswerRe: Equivalent of OLE_PropertyPage Pin
led mike14-Jul-06 6:26
led mike14-Jul-06 6:26 
QuestionChanging color of TabControl Pin
Mairaaj Khan13-Jul-06 23:50
professionalMairaaj Khan13-Jul-06 23:50 
AnswerRe: Changing color of TabControl Pin
stancrm14-Jul-06 0:33
stancrm14-Jul-06 0:33 
GeneralRe: Changing color of TabControl Pin
Mairaaj Khan14-Jul-06 0:53
professionalMairaaj Khan14-Jul-06 0:53 
Question.NET TrackBar! Pin
qyte13-Jul-06 23:44
qyte13-Jul-06 23:44 
AnswerRe: .NET TrackBar! Pin
Robert Rohde14-Jul-06 0:34
Robert Rohde14-Jul-06 0:34 
QuestionRemoving custom framework cabs Pin
Gavin Roberts13-Jul-06 23:43
Gavin Roberts13-Jul-06 23:43 
Questionsql command for INSERT ... Pin
mostafa_h13-Jul-06 23:38
mostafa_h13-Jul-06 23:38 
hi all,
there is 2 table (maintable[numdoc_id,...]) and(subtable[id,numdoc_id,...])and there is a one to many relation between 2 table .
in the MainForm :
...<br />
private int get_num_ID;<br />
...<br />
private int NUM_MY_ID(out int MY_ID)<br />
   {<br />
    ...<br />
    strFindID = "SELECT MAX(numdoc_id) as numdoc_id FROM MainTable";<br />
    ...<br />
    MY_ID = Int32.Parse(ds.Tables[0].Rows[0][0].ToString());<br />
    MY_ID++;<br />
    return MY_ID;<br />
    }

and for Insert Function in MainForm for subtable :
private void ADD_INTO_SubTable()<br />
   {<br />
    ...<br />
    try{<br />
    strSQL_P = "insert into subtable(numdoc_id,...)";<br />
    strSQL_P +="value('"+txtnumdoc_id.Text+"',...)";<br />
    ...<br />
    }...<br />
   }

and for Update Function in MainForm for subtable :
private void Update_INTO_SubTable()<br />
   {<br />
    ...<br />
    NUM_MY_ID(out get_num_ID);<br />
    try{<br />
    strSQL_P = "update payment set numdoc_id='"+get_num_ID+"'";<br />
    strSQL_P += ... where numdoc_id=" + get_num_ID;<br />
    ...<br />
    }...<br />
   }

txtnumdoc_id control is in MainForm(for maintable), but sometimes when I click the save button in main form ,the first numdoc_id row in maintable(e.g. '1') is added to the last row for subtable in numdoc_id field . I don't know where is my wrong .
Regards ,



s_mostafa_h
AnswerRe: sql command for INSERT ... Pin
Guffa14-Jul-06 1:53
Guffa14-Jul-06 1:53 
GeneralRe: sql command for INSERT ... Pin
mostafa_h15-Jul-06 8:05
mostafa_h15-Jul-06 8:05 
QuestionStatic and private mthods Pin
Brendan Vogt13-Jul-06 23:26
Brendan Vogt13-Jul-06 23:26 
AnswerRe: Static and private mthods Pin
Robert Rohde13-Jul-06 23:34
Robert Rohde13-Jul-06 23:34 
AnswerRe: Static and private mthods Pin
Rob Philpott13-Jul-06 23:46
Rob Philpott13-Jul-06 23:46 
AnswerRe: Static and private mthods Pin
AesopTurtle14-Jul-06 2:05
AesopTurtle14-Jul-06 2:05 
QuestionSerialization [modified] Pin
sjembek13-Jul-06 23:19
sjembek13-Jul-06 23:19 
AnswerRe: Serialization Pin
Robert Rohde13-Jul-06 23:30
Robert Rohde13-Jul-06 23:30 
GeneralRe: Serialization Pin
sjembek13-Jul-06 23:30
sjembek13-Jul-06 23:30 
GeneralRe: Serialization Pin
Robert Rohde13-Jul-06 23:39
Robert Rohde13-Jul-06 23:39 
GeneralRe: Serialization [modified] Pin
sjembek13-Jul-06 23:44
sjembek13-Jul-06 23:44 
QuestionNotifying File Size Exceeds Pin
engsrini13-Jul-06 21:34
engsrini13-Jul-06 21:34 
AnswerRe: Notifying File Size Exceeds Pin
stancrm13-Jul-06 21:58
stancrm13-Jul-06 21:58 
AnswerRe: Notifying File Size Exceeds Pin
J4amieC13-Jul-06 22:09
J4amieC13-Jul-06 22:09 
QuestionGDI+ Adjusting Font spacing for Pin
Jon Hulatt13-Jul-06 21:33
Jon Hulatt13-Jul-06 21:33 
AnswerRe: GDI+ Adjusting Font spacing for Pin
stancrm13-Jul-06 22:05
stancrm13-Jul-06 22:05 
AnswerRe: GDI+ Adjusting Font spacing for Pin
Robert Rohde13-Jul-06 23:17
Robert Rohde13-Jul-06 23:17 

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.