Here is a code.
public class ULogon
{
string sConnString="";
string UserName;
string DomainName;
Db db ;
ArrayList arrayList = new ArrayList();
public ULogon()
{
}
public void SetConnectionString(string sConnString)
{
db = new Db (sConnString);
}
public bool Logon()
{
if (db!=null)
{
Login lg = new Login (db);
lg.ShowDialog ();
UserName = lg.UserName ;
DomainName = lg.DomainName ;
return true;
}
else
return false;
}
}
"Sebastian Dau" <se***********@gmx.de> wrote in message
news:42*********************@read-nat.news.de.uu.net...
Where (in the same class as Logon() ??? ) is username and domain name
declared?
Do you re-initialize these fields accidentially right after the Login
Call?
Some more wrapping code of Login() is needed to provide you help.
Greets, Sebastian Dau
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d7**********@ss405.t-com.hr... public bool Logon()
{
if (db!=null)
{
Login lg = new Login (db);
lg.ShowDialog ();
UserName = lg.UserName ;
DomainName = lg.DomainName ;
return true;
}
else
return false;
}
I'm using this code to get UserName and DomainName from a dialog.
It is a dll file.
But, when I call another function in that same dll UserName and
DomainName variables are empty!
How can I save there values so that I can use it in another functions?
Hrcko