Exemplo n.º 1
0
 private void 模拟读表ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.dataGridView1.SelectedRows.Count == 1)
     {
         FrmRead frm = new FrmRead();
         frm.StartPosition = FormStartPosition.CenterParent;
         frm.Device        = this.dataGridView1.SelectedRows[0].Tag as Device;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             var d = new DeviceBLL(AppSettings.Current.ConnStr).GetByID(frm.Device.ID).QueryObject;
             ShowItemInGridViewRow(dataGridView1.SelectedRows[0], d);
         }
     }
 }
 private void 模拟读表ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.dataGridView1.SelectedRows.Count == 1)
     {
         FrmRead frm = new FrmRead();
         frm.StartPosition = FormStartPosition.CenterParent;
         frm.Device = this.dataGridView1.SelectedRows[0].Tag as Device;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             var d = new DeviceBLL(AppSettings.Current.ConnStr).GetByID(frm.Device.ID).QueryObject;
             ShowItemInGridViewRow(dataGridView1.SelectedRows[0], d);
         }
     }
 }