public void addUser(user tempUser) { //add users to database sql = "INSERT INTO User VALUES ('" + tempUser.getusername() + "','" + tempUser.getFirstName() + "','" + tempUser.getMiddleName() + "','" + tempUser.getLastName() + "','" + tempUser.getRoot() + "','" + tempUser.getCity() + "','" + tempUser.getemail() + "','" + tempUser.gethomeTelephone() + "','" + tempUser.GetType() + "');"; cmd.CommandText = sql; cmd.ExecuteNonQuery(); sql = "INSERT INTO Login_Details VALUES ('" + tempUser.getusername() + "','zaq@123', NULL,'" + DateTime.Today + "','False';"; cmd.CommandText = sql; cmd.ExecuteNonQuery(); // vary with the type of user }