private void gridControl_abnormal_MouseDoubleClick(object sender, MouseEventArgs e) { if (gridView_abnormal.SelectedRowsCount != 1) { MessageBox.Show("请选择一条记录!", "警告"); return; } //获取选中的行的行号 int[] rowNums = gridView_abnormal.GetSelectedRows(); List <GateRecord> list = (List <GateRecord>)gridControl_abnormal.DataSource; DataRow dr = new ModelHandler <GateRecord>().FillDataRow(list[rowNums[0]]); ShowClearanceInfoForm showClearanceInfoForm = new ShowClearanceInfoForm(dr); showClearanceInfoForm.ShowDialog(); }
private void simpleButton_view_Click(object sender, EventArgs e) { if (gridView_query.SelectedRowsCount != 1) { MessageBox.Show("请选择一条记录!", "警告"); return; } //获取选中的行的行号 int[] rowNums = gridView_query.GetSelectedRows(); DataTable dt = (DataTable)gridControl_query.DataSource; DataRow dr = dt.Rows[rowNums[0]]; ShowClearanceInfoForm showClearanceInfoForm = new ShowClearanceInfoForm(dr); showClearanceInfoForm.ShowDialog(); }
private void gridControl_abnormal_MouseDoubleClick(object sender, MouseEventArgs e) { if (gridView_abnormal.SelectedRowsCount != 1) { MessageBox.Show("请选择一条记录!", "警告"); return; } //获取选中的行的行号 int[] rowNums = gridView_abnormal.GetSelectedRows(); List<GateRecord> list = (List<GateRecord>)gridControl_abnormal.DataSource; DataRow dr = new ModelHandler<GateRecord>().FillDataRow(list[rowNums[0]]); ShowClearanceInfoForm showClearanceInfoForm = new ShowClearanceInfoForm(dr); showClearanceInfoForm.ShowDialog(); }