예제 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (Index >= 0)
            {
                string Address = this.VieweMail.Rows[Index].Cells["eMail Address"].Value.ToString();

                var tmp = from n in lsMail
                          where n.MailAddr == Address
                          select n;
                List <Mail> ls = new List <Mail>();
                foreach (var item in tmp)
                {
                    ls.Add(item);
                }
                eMailView view = new eMailView(true, ls, lsDiv, "Delete", this);
                view.Show();
            }
            else
            {
                MessageBox.Show("Select eMail list that will be delete", "ErrorMessage", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            eMailView view = new eMailView(true, null, lsDiv, "Add", this); // add 不用給lsMail

            view.Show();
        }