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;
}
知道是关于数据的删除和编辑..但是希望到每步的注解,本人是初学者~~谢谢各位达人们了~!!

解决方案 »

  1.   

    你这个是调用存储过程来执行更新和删除操作,同时,你这个操作是已经被封装过了的更新和删除方法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;