Пример #1
0
        private void lstAddress_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            formAddInfo formInfo = new formAddInfo()
            {
                mailAddress = lstAddress.Text
            };

            formInfo.ShowDialog();
        }
Пример #2
0
        private void btnAddressAdd_Click(object sender, EventArgs e)
        {
            formAddInfo formInfo = new formAddInfo();

            if (formInfo.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                modelAdd = new T_MailAddress()
                {
                    MAILADDRESS = formInfo.mailAddress
                };
                modelAdd.ID = bllAdd.Add(modelAdd);
                lstAddress.Items.Add(modelAdd);
                lstAddress.SelectedItem = modelAdd;
            }
        }