public static PhoneBookRow FindPhoneBookEntry(string number) { number = NormalizePhoneNumber(number); PhoneBookRow row = _defaultInstance.PhoneBook.FindBynumber(number); if (row == null && number.Length > 6) { DataRow[] rows = _defaultInstance.PhoneBook.Select("number LIKE '%" + number.Substring(number.Length - 6).Replace("'", "''") + "'"); foreach (PhoneBookRow r in rows) { if (r.number.EndsWith(number) || number.EndsWith(r.number)) { AddPhonebookEntry(number, r.name); return(r); } } } return(row); }
public void RemovePhoneBookRow(PhoneBookRow row) { this.Rows.Remove(row); }
public void AddPhoneBookRow(PhoneBookRow row) { this.Rows.Add(row); }
public PhoneBookRowChangeEvent(PhoneBookRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public static string NumToName(string number) { PhoneBookRow row = FindPhoneBookEntry(number); return((row == null) ? number : row.name); }