求助~帮忙解释代码谢谢了

linyan4949 2009-02-08 08:56:28
public static bool Pbupdate(publisher pub)
{
bool result=false;
result=publisher.Incommon("proc_pblish_update",pub);
return result;
}

public static bool PbDelete(string txtName)
{
bool result=false;
SqlParameter[] paras=new SqlParameter[1];
paras[0]=new SqlParameter("@PbName",SqlDbType.VarChar,50);
paras[0].Value=txtName;

result=DB.Excuteque("proc_pblish_delete",paras);

return result;
}
知道是关于数据的删除和编辑..但是希望到每步的注解,本人是初学者~~谢谢各位达人们了~!!
...全文
57 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
hubofly 2009-02-08
  • 打赏
  • 举报
回复
你这个是调用存储过程来执行更新和删除操作,同时,你这个操作是已经被封装过了的更新和删除方法

public static bool Pbupdate(publisher pub)
{
bool result=false;
// 调用publisher里面的Incommon方法来执行存储过程,存储过程名为proc_pblish_update 你的封装方法参数参数为 pub,publisher这个里面应该还有对应的各种操作等 下面删除 同理
result=publisher.Incommon("proc_pblish_update",pub);
return result;
}

public static bool PbDelete(string txtName)
{
bool result=false;
SqlParameter[] paras=new SqlParameter[1];
paras[0]=new SqlParameter("@PbName",SqlDbType.VarChar,50);
paras[0].Value=txtName;

result=DB.Excuteque("proc_pblish_delete",paras);

return result;
}

111,131

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧