ghasem deh

ghasem deh

  • NA
  • 258
  • 40k

how to use result of class in mainForm ?

May 20 2015 12:16 AM
hi, 
i want use result  of class in mainForm and display in lable :
 
public void Amar()
{
try
{
SqlConnection con = new SqlConnection(ConString);
SqlCommand com = new SqlCommand("select COUNT(*) from Software", con); // ????? ??? ????? ??? ???
con.Open();
SqlDataReader dr = com.ExecuteReader();
if (dr.Read())
{
int count = Int32.Parse(dr[0].ToString());
}
}
catch
{
Warning.ShowBox(@"! ??? ?????? ??????? ?? ????
???? ?? ????? ?????? ?? ???? ????? ????", "?????");
}
} 

Answers (4)