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

C#

 
GeneralRe: a query Pin
Sandeep Akhare19-Feb-07 22:20
Sandeep Akhare19-Feb-07 22:20 
QuestionStopping a Thread Pin
nasambur19-Feb-07 20:22
nasambur19-Feb-07 20:22 
QuestionHow to send back value to the Main WinForm? [modified] Pin
Khoramdin19-Feb-07 20:07
Khoramdin19-Feb-07 20:07 
AnswerRe: How to send back value to the Main WinForm? Pin
Martin#19-Feb-07 20:49
Martin#19-Feb-07 20:49 
GeneralRe: How to send back value to the Main WinForm? Pin
Khoramdin20-Feb-07 9:42
Khoramdin20-Feb-07 9:42 
GeneralRe: How to send back value to the Main WinForm? Pin
Martin#20-Feb-07 20:37
Martin#20-Feb-07 20:37 
AnswerRe: How to send back value to the Main WinForm? Pin
Rhys Gravell19-Feb-07 20:53
professionalRhys Gravell19-Feb-07 20:53 
Questiona query [modified] Pin
Nekshan19-Feb-07 19:51
Nekshan19-Feb-07 19:51 
private void logout_Click(object sender, EventArgs e)
{
conn.Open();
string strQury = "";
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")'";
SqlCommand cm = new SqlCommand(strQury, conn);
int n = Convert.ToInt32(cm.ExecuteScalar());
}

I have written this code in form1.cs and i need to write it there only on 'logout_click'.
Now i want to use this 'int n' in a function in form2.cs of same project:
funEntrylogin(m, i, tb_id.Text, tb_pswd.Text, DateTime.Now,n);
but here it is giving error on 'n',if i write the above code, as 'n' is not declared in form2.cs.
How can i declare this 'int n' of form1 in form2?
How can i do this?
thanx.
nekshan.




-- modified at 1:57 Tuesday 20th February, 2007
AnswerRe: a query Pin
virendra patel19-Feb-07 20:05
virendra patel19-Feb-07 20:05 
GeneralRe: a query [modified] Pin
Nekshan19-Feb-07 20:39
Nekshan19-Feb-07 20:39 
AnswerRe: a query Pin
Sandeep Akhare19-Feb-07 20:08
Sandeep Akhare19-Feb-07 20:08 
GeneralRe: a query Pin
Nekshan19-Feb-07 20:16
Nekshan19-Feb-07 20:16 
GeneralRe: a query Pin
Sandeep Akhare19-Feb-07 20:22
Sandeep Akhare19-Feb-07 20:22 
AnswerRe: a query Pin
NanaAM19-Feb-07 20:11
NanaAM19-Feb-07 20:11 
GeneralRe: a query Pin
Nekshan19-Feb-07 20:17
Nekshan19-Feb-07 20:17 
GeneralRe: a query Pin
virendra patel19-Feb-07 20:34
virendra patel19-Feb-07 20:34 
AnswerRe: a query Pin
NanaAM19-Feb-07 21:56
NanaAM19-Feb-07 21:56 
AnswerRe: a query Pin
Russell Jones19-Feb-07 22:22
Russell Jones19-Feb-07 22:22 
QuestionError window Pin
hiremath7119-Feb-07 19:49
hiremath7119-Feb-07 19:49 
AnswerRe: Error window Pin
NanaAM19-Feb-07 20:15
NanaAM19-Feb-07 20:15 
GeneralRe: Error window Pin
hiremath7120-Feb-07 19:41
hiremath7120-Feb-07 19:41 
QuestionConvert PDF file to Word File Pin
Member 126126919-Feb-07 19:24
Member 126126919-Feb-07 19:24 
Questionwindow service Pin
atulonweb@hotmail.com19-Feb-07 18:10
atulonweb@hotmail.com19-Feb-07 18:10 
AnswerRe: window service Pin
mike montagne19-Feb-07 18:35
mike montagne19-Feb-07 18:35 
AnswerRe: window service Pin
coolestCoder19-Feb-07 19:56
coolestCoder19-Feb-07 19:56 

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.