public void DownloadContacts(string account_type_str, string username, string password, AccountDownloadListener notify) { DBManager db = new DBManager(); AccountDB account = db.AddOrUpdateAccountByUserPassAccTypeString(username, password, account_type_str); if (account.Id > 0) { DownloadContacts(account, notify); } else { notify.NotifyStatusByUsername(username, DownloadStatus.DATABASE_ERROR, "Database Error"); } }