public PayAddInfoAddChangeForm(NoticeNoticeInformationAddress noticeNoticeInformationAddress, string str) : this() { this.m_NoticeNoticeInformationAddress = noticeNoticeInformationAddress; this.btnAddChange.set_Text(str); this.set_Text(str + " сообщение"); }
private void btnAdd_Click(object sender, System.EventArgs e) { NoticeNoticeInformationAddress noticeNoticeInformationAddress = new NoticeNoticeInformationAddress(); if (this.areaAddressesTree.SelectedNode == null) { Messages.ShowWarning("Выберите адрес"); } else { LocalAddress localAddress = (LocalAddress) this.areaAddressesTree.SelectedNode.get_Tag(); if (localAddress.Level.ToString() == "Жилье") { Messages.ShowWarning("Выберите адрес"); } else { noticeNoticeInformationAddress.AddrId = localAddress.Id; new PayAddInfoAddChangeForm(noticeNoticeInformationAddress, "Добавить").ShowDialog(); ObjectList<NoticeNoticeInformationAddress> list = NoticeNoticeInformationAddress.FindByAddrId(localAddress); this.bsNoticeInfoAdr.set_DataSource(list); this.btnAdd.set_Enabled(true); if (list.get_Count() != 0) { this.btnAdd.set_Enabled(false); } } } }
public PayAddInfoAddChangeForm() { this.m_NoticeNoticeInformationAddress = new NoticeNoticeInformationAddress(); this.InitializeComponent(); }