public static Boolean IsTwitterReady(MemberAccount account) { if (account == null) { return(false); } if (account.AccountType != 1) { return(false); } if (account.MemberAccountID == 0) { return(false); } if (account.MemberID == 0) { return(false); } if (String.IsNullOrEmpty(account.Password)) { return(false); } if (String.IsNullOrEmpty(account.Username)) { return(false); } return(true); }
public static Boolean IsTwitterReady(MemberAccount account) { if (account == null) return false; if (account.AccountType != 1) return false; if (account.MemberAccountID == 0) return false; if (account.MemberID == 0) return false; if (String.IsNullOrEmpty(account.Password)) return false; if (String.IsNullOrEmpty(account.Username)) return false; return true; }
/// <summary> /// Takes an prepopulated IDataReader and creates an array of MemberAccounts /// </summary> public static List<MemberAccount> PopulateObject(IDataReader dr) { ColumnFieldList list = new ColumnFieldList(dr); List<MemberAccount> arr = new List<MemberAccount>(); MemberAccount obj; while (dr.Read()) { obj = new MemberAccount(); if (list.IsColumnPresent("MemberAccountID")) { obj._memberAccountID = (int)dr["MemberAccountID"]; } if (list.IsColumnPresent("MemberID")) { obj._memberID = (int)dr["MemberID"]; } if (list.IsColumnPresent("AccountType")) { obj._accountType = (int)dr["AccountType"]; } if (list.IsColumnPresent("Username")) { obj._username = (string)dr["Username"]; } if (list.IsColumnPresent("Password")) { obj._password = (string)dr["Password"]; } arr.Add(obj); } dr.Close(); return arr; }