private void btnToShowPic_Click(object sender, EventArgs e) { try { frmPicShow frm = new frmPicShow(); frm.GBID = SysConvert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DtsID")); frm.ShowDialog(); } catch (Exception E) { this.ShowMessage(E.Message); } }
private void btnToShowPic_Click(object sender, EventArgs e) { try { frmPicShow frm = new frmPicShow(); switch (xtraTabControl1.SelectedTabPageIndex) { case 0: //卡片模式 frm.GBID = SysConvert.ToInt32(cardView1.GetRowCellValue(cardView1.FocusedRowHandle, "DtsID")); break; case 1: //列表模式 frm.GBID = SysConvert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DtsID")); break; } frm.ShowDialog(); } catch (Exception E) { this.ShowMessage(E.Message); } }