<pre> public bool CheckUser(string firstName, string surname, string email, DateTime dob, out int PersonID, out int CategoryID, out bool terms, out string categoryDesc) { DataSet ds = new DataSet(); bool userExists = false; PersonID = 0; CategoryID = 0; categoryDesc = String.Empty; terms = false; OpenConnection(); try { using (ISqlCommand command = CreateCommand()) { command.SetCommandText(this.CheckUserCommandText); command.SetStringParameter("FirstName", firstName); command.SetStringParameter("Surname", surname); command.SetStringParameter("Email", email); command.SetDateTimeParameter("DOB", dob); command.OpenCommand(ds, "User"); try { PersonID = Converter.ToInteger(ds.Tables[0].Rows[0]["PersonID"]); CategoryID = Converter.ToInteger(ds.Tables[0].Rows[0]["CategoryID"]); terms = Convert.ToBoolean(ds.Tables[0].Rows[0]["Terms"]); categoryDesc = Converter.ToString(ds.Tables[0].Rows[0]["Category"]); userExists = true; } catch { userExists = false; } } } finally { CloseConnection(); } return userExists; }
terms
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)