Click here to Skip to main content
15,917,522 members
Home / Discussions / C#
   

C#

 
GeneralNot Sure! Pin
Naji.A2-Jul-06 11:15
Naji.A2-Jul-06 11:15 
GeneralRe: Not Sure! Pin
Guffa3-Jul-06 0:34
Guffa3-Jul-06 0:34 
GeneralPage Structure Pin
Naji.A3-Jul-06 12:26
Naji.A3-Jul-06 12:26 
AnswerRe: Page Structure Pin
Guffa3-Jul-06 18:58
Guffa3-Jul-06 18:58 
GeneralFigured it Out [modified] Pin
Naji.A4-Jul-06 8:51
Naji.A4-Jul-06 8:51 
QuestionGet return value from one class to another Pin
Saamir28-Jun-06 11:04
Saamir28-Jun-06 11:04 
AnswerRe: Get return value from one class to another Pin
led mike28-Jun-06 11:22
led mike28-Jun-06 11:22 
AnswerRe: Get return value from one class to another Pin
Martin#28-Jun-06 11:26
Martin#28-Jun-06 11:26 
QuestionRe: Get return value from one class to another Pin
Saamir28-Jun-06 11:54
Saamir28-Jun-06 11:54 
AnswerRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 12:09
Alexander Wiseman28-Jun-06 12:09 
QuestionRe: Get return value from one class to another Pin
Saamir28-Jun-06 12:20
Saamir28-Jun-06 12:20 
QuestionRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 12:28
Alexander Wiseman28-Jun-06 12:28 
QuestionRe: Get return value from one class to another Pin
Saamir28-Jun-06 16:20
Saamir28-Jun-06 16:20 
Hi Alexander;
Thank you for helping me with this.

Here is the code snippet:

Form1.

m_nSessionId=processObj.SessionID;
if(m_nSessionId!=-1)
{
//string test=m_nSessionId.ToString();
//MessageBox.Show(this,test);//m_nSessiodId at this point is holding a value.
ProcessReport report = new ProcessReport();//creating form2 object and assigning m_nSessiodId to public variable
report.SessionId=m_nSessionId;
report.ShowDialog();
}

form 2
//creating SessionId variable
public long SessionId;

//Function in form 2 where I need the value of m_nSessionId from form1
private void LoadReport()
try
{
if(SessionId!=-1)
{
cryShared.TableLogOnInfo tbLogInfo=null;
CBResult rpt=new CBResult();
foreach ( cryEngine.Table tb in rpt.Database.Tables)
{
tbLogInfo=tb.LogOnInfo;
tbLogInfo.ConnectionInfo.ServerName=m_sServer;
tbLogInfo.ConnectionInfo.DatabaseName=m_sDBName;
tbLogInfo.ConnectionInfo.UserID=m_sUserId;
tbLogInfo.ConnectionInfo.Password=m_sPassword;
tb.ApplyLogOnInfo(tbLogInfo);

tb.Location="\"" + m_sDBName+".dbo.\"" +
tb.Location.Substring(tb.Location.LastIndexOf(".")+1);
}

cryShared.ParameterValues pvs=new cryShared.ParameterValues();
cryShared.ParameterDiscreteValue pv=new cryShared.ParameterDiscreteValue();
pv.Value=SessionId;
pvs.Add(pv);
rpt.DataDefinition.ParameterFields["Ad_Parameter1"].ApplyCurrentValues(pvs);
crystalReportViewer1.ReportSource=rpt;

}
}

Thank you again for all your help.

sasa
AnswerRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 16:30
Alexander Wiseman28-Jun-06 16:30 
QuestionRe: Get return value from one class to another [modified] Pin
Saamir28-Jun-06 16:32
Saamir28-Jun-06 16:32 
JokeRe: Get return value from one class to another Pin
Saamir28-Jun-06 16:40
Saamir28-Jun-06 16:40 
GeneralRe: Get return value from one class to another Pin
Alexander Wiseman28-Jun-06 16:48
Alexander Wiseman28-Jun-06 16:48 
AnswerRe: Get return value from one class to another Pin
Mike Poz28-Jun-06 12:12
Mike Poz28-Jun-06 12:12 
AnswerRe: Get return value from one class to another Pin
Rojan Gh.28-Jun-06 14:45
professionalRojan Gh.28-Jun-06 14:45 
Questionload a whole database into a DataSet Pin
hamidreza_buddy28-Jun-06 10:56
hamidreza_buddy28-Jun-06 10:56 
AnswerRe: load a whole database into a DataSet Pin
stancrm28-Jun-06 20:26
stancrm28-Jun-06 20:26 
QuestionXMLSerialize and Microsoft Controls Pin
3Dizard28-Jun-06 10:14
3Dizard28-Jun-06 10:14 
AnswerRe: XMLSerialize and Microsoft Controls Pin
BoneSoft28-Jun-06 10:55
BoneSoft28-Jun-06 10:55 
QuestionHelp with UserControl State Save and Restore Pin
TheBlindWatchmaker28-Jun-06 9:04
TheBlindWatchmaker28-Jun-06 9:04 
AnswerRe: Help with UserControl State Save and Restore [modified] Pin
Martin#28-Jun-06 9:59
Martin#28-Jun-06 9:59 

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.