DevExpress中的GridView(GRIDCONTROL)中的右键全选、反选、撤销、复制单元格值ContextMenuStrip
DevExpress中的GridView(GRIDCONTROL)中的右键全选、反选、撤销、复制单元格值ContextMenuStrip
2018年11月22日 11:25:41 mQney 阅读数 177
-
#region 标本接收的右键
-
private void 全选ToolStripMenuItem_Click(object sender, EventArgs e)
-
{
-
if (this._dtT_LIS_SAMPLERECEIVE_REPORTS == null || this._dtT_LIS_SAMPLERECEIVE_REPORTS.Rows.Count < 1) { return; }
-
foreach (DataRow drT_LIS_SAMPLERECEIVE_REPORTS in this._dtT_LIS_SAMPLERECEIVE_REPORTS.Rows)
-
{
-
drT_LIS_SAMPLERECEIVE_REPORTS[TableField.V_SEL] = EnumYesNo.YES.ToString("d");
-
}
-
}
-
private void 反选ToolStripMenuItem_Click(object sender, EventArgs e)
-
{
-
if (this._dtT_LIS_SAMPLERECEIVE_REPORTS == null || this._dtT_LIS_SAMPLERECEIVE_REPORTS.Rows.Count < 1) { return; }
-
foreach (DataRow drT_LIS_SAMPLERECEIVE_REPORTS in this._dtT_LIS_SAMPLERECEIVE_REPORTS.Rows)
-
{
-
int i = 0;
-
string strValue = drT_LIS_SAMPLERECEIVE_REPORTS[TableField.V_SEL] == null ? "" : drT_LIS_SAMPLERECEIVE_REPORTS[TableField.V_SEL].ToString();
-
int.TryParse(strValue, out i);
-
drT_LIS_SAMPLERECEIVE_REPORTS[TableField.V_SEL] = i ^ 1;
-
}
-
}
-
private void 全撤ToolStripMenuItem_Click(object sender, EventArgs e)
-
{
-
if (this._dtT_LIS_SAMPLERECEIVE_REPORTS == null || this._dtT_LIS_SAMPLERECEIVE_REPORTS.Rows.Count < 1) { return; }
-
foreach (DataRow drT_LIS_SAMPLERECEIVE_REPORTS in this._dtT_LIS_SAMPLERECEIVE_REPORTS.Rows)
-
{
-
drT_LIS_SAMPLERECEIVE_REPORTS[TableField.V_SEL] = EnumYesNo.NO.ToString("d");
-
}
-
}
-
private void 复制病历号ToolStripMenuItem_Click(object sender, EventArgs e)
-
{
-
int rowHandle = this.gridView采样标本接收.FocusedRowHandle;
-
if (rowHandle >= 0)
-
{
-
DataRow row = this.gridView采样标本接收.GetDataRow(rowHandle);
-
try
-
{
-
Clipboard.SetText(row[TableField.T_LIS_SAMPLERECEIVE_REPORTS.MEDICALRECORDNO] == null ? "" : row[TableField.T_LIS_SAMPLERECEIVE_REPORTS.MEDICALRECORDNO].ToString());
-
}
-
catch (Exception)
-
{
-
//throw;
-
}
-
}
-
}
-
private void 复制姓名ToolStripMenuItem_Click(object sender, EventArgs e)
-
{
-
int rowHandle = this.gridView采样标本接收.FocusedRowHandle;
-
if (rowHandle >= 0)
-
{
-
DataRow row = this.gridView采样标本接收.GetDataRow(rowHandle);
-
try
-
{
-
Clipboard.SetText(row[TableField.T_LIS_SAMPLERECEIVE_REPORTS.PNAME] == null ? "" : row[TableField.T_LIS_SAMPLERECEIVE_REPORTS.PNAME].ToString());
-
}
-
catch (Exception)
-
{
-
//throw;
-
}
-
}
-
}
-
private void 复制条码号ToolStripMenuItem_Click(object sender, EventArgs e)
-
{
-
int rowHandle = this.gridView采样标本接收.FocusedRowHandle;
-
if (rowHandle >= 0)
-
{
-
DataRow row = this.gridView采样标本接收.GetDataRow(rowHandle);
-
try
-
{
-
Clipboard.SetText(row[TableField.T_LIS_SAMPLERECEIVE_REPORTS.REQUESTRECORDNO] == null ? "" : row[TableField.T_LIS_SAMPLERECEIVE_REPORTS.REQUESTRECORDNO].ToString());
-
}
-
catch (Exception)
-
{
-
//throw;
-
}
-
}
-
}
-
#endregion
相关文章
- 通过SQL Server 2008数据库复制实现数据库同步备份
- 用select语句复制一个表到新表(包含表中的数据)!
- js实现网页中无法选取/复制/粘贴/剪切/拖放/禁用右键
- Linux内核实现多路镜像流量聚合和复制
- rank(),允许并列名次、复制名次自动空缺,结果如12245558……
- 转 pip离线复制python开发环境 以及报错invalid syntax 和 cx_oracle 处理clob
- 网站源码保护,禁止右键以及复制
- scp命令:服务器间远程复制代码
- 怎样复制网页中不能选中或复制的内容
- MySQL建立双向主备复制server配置方法
- 教你使用SQL数据库复制系列(1-7)
- CAD格式刷怎么用?可以复制哪些特性?