1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public static string readUID = "";
public static string readPWD = "";

public static void executeRead(string conString, string comString)
{
SqlConnection sCon = new SqlConnection(conString);
SqlCommand sCom = new SqlCommand(comString);

sCon.Open();
SqlDataReader sRead = sCom.ExecuteReader();

if (sRead.Read() == true)
{
readUID = sRead[0].ToString();
readPWD = sRead[1].ToString();
}
}

string UID;
string PWD;

public void Login(string User, string Pass)
{
UID = ClassVar.readUID;
PWD = ClassVar.readPWD;

if (UID == User && PWD == Pass)
}