public string getID(string user, string pass) { string id = ""; try { conn.OpenConnection(); string strSql = "SELECT * FROM NhanVien WHERE userName ='******' and password='******'"; SqlDataReader dr = conn.getReader(strSql); while (dr.Read()) { id = dr["TenNV"].ToString(); } } catch (Exception) { MessageBox.Show("That bai khi ket noi"); } finally { conn.ClosedConnection(); } return(id); }