public void UnBarTelephoneNumber_Handler() { // Unbar a telephone number // Input the telephone number to unbar string areaCode = null; string exchange = null; string number = null; if (!terminalDevice.GetTelephoneNumber(ref areaCode, ref exchange, ref number)) { return; } Calls newCall = new Calls(areaCode, exchange, number, DateTime.Now, DateTime.Now); foreach (BarNumber ba in currentTenant.barredNumbers) { if (newCall.ToString().Equals(ba.number)) { currentTenant.barredNumbers.Remove(ba); } } }
public BarNumber(Calls number) { this.number = number.ToString(); }