示例#1
0
文件: frmDevices.cs 项目: wpmyj/XN
        private void toolStripButton_Add_Click(object sender, EventArgs e)
        {
            frmDeviceEdit f = new frmDeviceEdit();

            if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.BindData();
            }
        }
示例#2
0
文件: frmDevices.cs 项目: wpmyj/XN
        private void toolStripButton_Modify_Click(object sender, EventArgs e)
        {
            if (this.dgvMain.CurrentRow == null)
            {
                return;
            }
            if (this.dgvMain.CurrentRow.Index >= 0)
            {
                string      DeviceNo = this.dgvMain.SelectedRows[0].Cells[1].Value.ToString();
                DataRowView drv      = dgvMain.SelectedRows[0].DataBoundItem as DataRowView;
                DataRow     dr       = drv.Row;

                frmDeviceEdit f = new frmDeviceEdit(dr);
                if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    this.BindData();
                }
            }
        }