DialogResult dr = MessageBox.Show ("Confirm Delete record?") "," hint ", 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 joins Pmw_billcode b on O.order_code=b.order_code where IsNull (o.doublecheck,0) =1 and isn Ull (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 ("Cannot obtain this data");
E.cancel = true;
}
}
Else
{
E.cancel = true;
}
C # DataGridView Userdeletingrow event, deleting