예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmDeviceManagementEdit frmDeviceManagementEdit = new frmDeviceManagementEdit("", "", "", "", "");

            if (frmDeviceManagementEdit.ShowDialog() == DialogResult.OK)
            {
                frmDeviceManagementEdit.Dispose();
                loadData();
            }
        }
예제 #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (rowindex < 0)
            {
                return;
            }
            frmDeviceManagementEdit frmDeviceManagementEdit = new frmDeviceManagementEdit(dataGridView.Rows[rowindex].Cells["设备ID"].Value.ToString(), dataGridView.Rows[rowindex].Cells["设备名称"].Value.ToString(), dataGridView.Rows[rowindex].Cells["部门"].Value.ToString(), dataGridView.Rows[rowindex].Cells["IP地址"].Value.ToString(), dataGridView.Rows[rowindex].Cells["备注"].Value.ToString());

            if (frmDeviceManagementEdit.ShowDialog() == DialogResult.OK)
            {
                frmDeviceManagementEdit.Dispose();
                loadData();
            }
        }