Esempio n. 1
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        private void EditListViewDataSource()
        {
            if (this.betterListView1.SelectedItems.Count == 0)
            {
                return;
            }

            string      serverIp = this.betterListView1.SelectedItems[0].SubItems[0].Text;
            FormDesktop frm      = new FormDesktop();

            frm._Action   = "EDIT";
            frm._ServerIp = serverIp;
            frm.ShowDialog();
        }
Esempio n. 2
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        private void AddOrEditListViewDataSource(OperType type)
        {
            FormDesktop frm = new FormDesktop();

            if (type == OperType.Edit)
            {
                if (this.betterListView1.SelectedItems.Count == 0)
                {
                    return;
                }
                string serverIp = this.betterListView1.SelectedItems[0].SubItems[0].Text;
                frm._Action   = "EDIT";
                frm._ServerIp = serverIp;
            }
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                BindsListViewDataSource();
            }
        }
Esempio n. 3
0
        private void tsbAddData_Click(object sender, EventArgs e)
        {
            FormDesktop frm = new FormDesktop();

            frm.ShowDialog();
        }