Exemple #1
0
        private void edit()
        {
            switch (type)
            {
            case 1:
                if (this.listView1.SelectedItems.Count > 0 && this.listView1.SelectedItems[0].Tag != null)
                {
                    string id = this.listView1.SelectedItems[0].Tag.ToString();

                    frmAddEmailList frm = new frmAddEmailList(id);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        BindData();
                    }
                }
                else
                {
                    MessageBox.Show("请选择你要修改的记录!", " 系统提示");
                }
                break;

            case 2:
                if (this.listView1.SelectedItems.Count > 0 && this.listView1.SelectedItems[0].Tag != null)
                {
                    string[] list = this.listView1.SelectedItems[0].Tag.ToString().Split(',');

                    string id       = list[0].ToString();
                    int    port     = list[1].ToString().ToInt(25);
                    string username = list[2].ToString();
                    string password = list[3].ToString();

                    frmAddSMTPList frm = new frmAddSMTPList(id, port, username);

                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        BindData();
                    }
                }
                else
                {
                    MessageBox.Show("请选择你要修改的记录!", " 系统提示");
                }
                break;
            }
        }
Exemple #2
0
        private void mnuAdd_Click(object sender, EventArgs e)
        {
            switch (type)
            {
            case 1:
                frmAddEmailList frm2 = new frmAddEmailList();
                if (frm2.ShowDialog() == DialogResult.OK)
                {
                    BindData();
                }
                break;

            case 2:
                frmAddSMTPList frm1 = new frmAddSMTPList();
                if (frm1.ShowDialog() == DialogResult.OK)
                {
                    BindData();
                }
                break;
            }
        }
Exemple #3
0
        private void mnuAdd_Click(object sender, EventArgs e)
        {
            switch (type) {
                case 1:
                    frmAddEmailList frm2 = new frmAddEmailList();
                    if (frm2.ShowDialog() == DialogResult.OK) BindData();
                    break;

                case 2:
                    frmAddSMTPList frm1 = new frmAddSMTPList();
                    if (frm1.ShowDialog() == DialogResult.OK) BindData();
                    break;
            }
        }
Exemple #4
0
        private void edit()
        {
            switch (type) {
                case 1:
                    if (this.listView1.SelectedItems.Count > 0 && this.listView1.SelectedItems[0].Tag != null) {
                        string id = this.listView1.SelectedItems[0].Tag.ToString();

                        frmAddEmailList frm = new frmAddEmailList(id);
                        if (frm.ShowDialog() == DialogResult.OK) BindData();
                    } else
                        MessageBox.Show("请选择你要修改的记录!", " 系统提示");
                    break;
                case 2:
                    if (this.listView1.SelectedItems.Count > 0 && this.listView1.SelectedItems[0].Tag != null) {
                        string[] list = this.listView1.SelectedItems[0].Tag.ToString().Split(',');

                        string id = list[0].ToString();
                        int port = list[1].ToString().ToInt(25);
                        string username = list[2].ToString();
                        string password = list[3].ToString();

                        frmAddSMTPList frm = new frmAddSMTPList(id, port, username);

                        if (frm.ShowDialog() == DialogResult.OK) BindData();
                    } else
                        MessageBox.Show("请选择你要修改的记录!", " 系统提示");
                    break;
            }
        }