DialogResult dr = MessageBox.Show("确认删除记录吗?", "提示", MessageBoxButtons.YesNo);
            if (dr == DialogResult.Yes)
            {
                DataSet deleRcom2 = Collections.FastSocket.get_ds("select o.id,b.dd_size,b.size_long,b.size_wide,b.size_high,o.goodsType,o.cname,o.pay_type,o.order_memo,o.address,o.RecipientCode,o.mobile,o.country_free,o.agencyFund,o.order_code,o.cforhmType,b.goods,b.kd_billcode,b.dd_weight,b.dd_weight2,b.member_id,b.username,b.goodsTyep goodsType2  from pmw_order o left join pmw_billcode b on o.order_code=b.order_code where isnull(o.DoubleCheck,0)=1 and isnull(b.lost_flag,0)=0 and isnull(b.is_outplace,0)=1 and  isnull(is_packed,0)=0 and isnull(packed_billcode,'')='' and o.order_code='" + this.tool_order_code.Text + "' and b.kd_billcode='" + e.Row.Cells["kd_billcode2"].Value + "'");
                if (deleRcom2 != null && deleRcom2.Tables.Count > 0 && deleRcom2.Tables[0].Rows.Count > 0)
                {

                    DataTable dt1 = (DataTable)rcomdgv1.DataSource;
                    DataRow drcalc = dt1.NewRow();
                    drcalc.ItemArray = deleRcom2.Tables[0].Rows[0].ItemArray;
                    dt1.Rows.Add(drcalc);
                    rcomdgv1.DataSource = dt1;
                }
                else
                {
                    MessageBox.Show("无法获取该数据");
                    e.Cancel = true;
                }
            }
            else
            {
                e.Cancel = true;
            }

C# DataGridView 的UserDeletingRow事件,删除的更多相关文章

  1. DataGridView的Validating事件注册后删除操作的处理

    我们在处理DataGridView必填项判断时,一般使用DataGridView的RowValidating事件判断,具体代码如下: protected override void OnRowVali ...

  2. DataGridView上下键事件获取到的是上次停留行的内容

    DataGridView上下键事件 在DataGridView中,通过上下键将选中行的内容返回, 问题: 通过上边的方法总是获取到上次停留行的内容,不是当前选中行的内容. winform的项目,使用C ...

  3. DataGridView的Cell事件的先后触发顺序

    最近正在使用“DataGridView”对一个旧的Vs 2003开发的WINDOWS应用程序进行改造. 发现Vs 2003中的"DataGrid"中的一些事件已经在新的控件Data ...

  4. DataGridView属性和事件

    //注册绑定事件 private void dgvBidFile_EditingControlShowing(object sender, DataGridViewEditingControlShow ...

  5. DataGridView绑定数据、删除数据

    定义学生类: using System; using System.Collections.Generic; using System.Linq; using System.Text; using S ...

  6. DataGridView 些许事件测试

    原始设计需求:当单元格内容是空白时,鼠标进入之后,显示一些数据 直观的第一感觉必然是用CellClick,细想,如果用户不用鼠标,直接按Tab键切换单元格呢?又或者,用户直接双击涅~ 主要测试的是:  ...

  7. C# DataGridView中DataGridViewComboBoxCell列,下拉框事件的处理【完美解决】

    http://blog.csdn.net/a312100321/article/details/25195311 问题:DataGridView绑定数据源之后,有一列需要用下拉框DataGridVie ...

  8. 给datagridview的下拉框添加valueChange事件

    修改datagridview的EditMode属性为EdutOnEnter,否则需要点2次以上才出现下拉框 1.给DataGridView添加EditingControlShowing事件: 2.编辑 ...

  9. 将listBox中信息显示在dataGridview中,操作datagridview后删除listBox信息和SQL数据库信息 续(浅谈listBox..)

    应用场景      对datagridview控件使用了解,以及操作datagridview选中的信息删除,并且有二次确认后才删除用户信息.相应的删除listbox中用户信息,下面一起看看需要哪些准备 ...

随机推荐

  1. Libevent 事件循环(2)---事件被加入激活队列

    由Libevent 事件循环(1) 在上文中我们提到了libevent 事件循环event_dispatch 的大致过程,以epoll为例,我们看一下事件被如何加入激活队列. //在epoll_dis ...

  2. Linux 配置Jenkins

    一.安装包下载: 1. jdk-8u152-linux-x64.tar.gz下载: wget http://download.oracle.com/otn-pub/java/jdk/8u152-b16 ...

  3. C#基础,目录

    首先,要说明一下本系列会以使用C#为侧重点,不会系统的.大篇量的去解说一些名词,比如:runtime.IL等.文章会在合适的时候对用到的基本概念进行简述.如果你是初学者,建议你也不要过度的去纠结,等你 ...

  4. bootstrap-select多选下拉列表插件使用小记

    下载插件 插件地址:http://silviomoreto.github.io/bootstrap-select/ 下载好后引用css和js文件 <!-- 因为是jquery插件,所以引用前先引 ...

  5. 【NOIP2014提高组】解方程

    https://www.luogu.org/problem/show?pid=2312 对于30%的数据,n<=2,暴力带入试解.对于50%的数据,ai很大,结合高精乘法和霍纳算法暴力代入试解. ...

  6. 三十天学不会TCP,UDP/IP网络编程-ARP -- 连接MAC和IP

    继续来做(da)推(guang)介(gao)我自己的!由于这两年接触到了比较多的这方面的知识,不想忘了,我决定把他们记录下来,所以决定在GitBook用半年时间上面写下来,这是目前写的一节,目前已完成 ...

  7. react.js - 基于create-react-app的打包后文件根路径修改

    用create-react-app脚手架搭建的react项目 使用 npm run build 之后生成的打包文件只能在根目录访问 这样放在服务器目录就访问不到了 报错为: 手动更改index.htm ...

  8. Object-Relational Structural Patterns

    Single Table Inheritance Represents an inheritance hierarchy of classes as a single table that has c ...

  9. UVA - 11082 Matrix Decompressing(最大流+行列模型)

    题目大意:给出一个R行C列的矩阵,如今给出他的前1-R行和 && 前1-C列和,问这个矩阵原来是如何的,要求每一个元素大小在1-20之间 解题思路:将每一行连接到超级源点,容量为该行的 ...

  10. myeclipse将java项目转换成web项目,导出war包

    1.项目右击属性,勾选以下两项,点击apply,关掉窗体,又一次打开 2.打开assembly,删掉webroot文件夹.把相应的webapp文件夹加入进来 watermark/2/text/aHR0 ...