예제 #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();
                }
            }
        }