public Lose GetLose(Person p) { SqlCommand cmd = ConnectSql(string.Format("Select * From Lose Where LoseId = '{0}' ", p.PersonID)); SqlDataReader reader = cmd.ExecuteReader(); Lose lose = new Lose(); bool check = false; if (reader.Read()) { lose = lose.Initialization(reader); check = true; } connection.DisConnectSql(); if (check == true) { return(lose); } return(null); }