/// <summary> /// Добавляет телефонный номер. /// </summary> public virtual void AddPhoneNumber() { PhoneNumber number = PhoneNumber.GetNewNumber(); number.SubscriberID = subscriber.ID; _phonesToAdd.Add(number); ISelectTariffController ctcontr = new ChangeTariffController(number); View.FormSelectTariff form = new View.FormSelectTariff(ctcontr); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { } }
/// <summary> /// Редактирует телефонный номер. /// </summary> /// <param name="phoneNumber">Номер телефона</param> public virtual void EditPhoneNumber(string phoneNumber) { foreach (PhoneNumber n in phones) { if (n.Number == phoneNumber.Trim()) { _phonesToUpdate.Add(n); ISelectTariffController ctcontr = new ChangeTariffController(n); View.FormSelectTariff form = new View.FormSelectTariff(ctcontr); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { } return; } } foreach (PhoneNumber n in _phonesToAdd) { if (n.Number == phoneNumber.Trim()) { //_phonesToUpdate.Add(n); ISelectTariffController ctcontr = new ChangeTariffController(n); View.FormSelectTariff form = new View.FormSelectTariff(ctcontr); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { } return; } } }