回复 3楼 tanghuawei
public
class Ac_Delete
{
DataTable dt = new DataTable();
OperateBusi ob = new OperateBusi();
public DataTable Delete(string ID)
{
string sql = "Pay_Delete ";
sql += "'" + ID + "'";
dt = ob.ExecBusiOrder(sql);
return dt;
}
}
///操作类
create proc Pay_Delete
@ID int
as
set nocount on
delete
from Pay
where D_ID=@ID
if @@ERROR<>0
begin
select -3,'删除表失败'
return -3
end
select 999 '操作成功'
go
///存储过程
string ID = txt_dh.Value;
DataTable dt = new DataTable();
dt = ac_delete.Delete(ID);
if (Message_Alert_web.IsExecSuccess(dt))
{
Message_Alert_("删除成功", "../CW/Query.aspx");
}
///代码
哪里需要改进