public int select_for_updatexulie(Model.tiaominfo tm)
{
CommandType ct = CommandType.Text;
string sql = "select 条目ID from 作品条目表 where 作品ID=@作品ID";
SqlParameter[] paras = new SqlParameter[]{
new SqlParameter("@作品ID",SqlDbType.Int),
};
paras[0].Value = tm.zuopId;
int a = Convert.ToInt32(DB.ExcuteScalar(ct, sql, paras));
return a;
}
public int insert_tm_DLL(Model.tiaominfo tm)
{
CommandType ct = CommandType.StoredProcedure;
SqlParameter[] par = new SqlParameter[] {
new SqlParameter("@条目ID",SqlDbType.Int),
new SqlParameter( "@主题",SqlDbType.NVarChar,100),
new SqlParameter( "@介绍",SqlDbType.NVarChar,200)
};
par[0].Value = tm.tmId;
par[1].Value = tm.zhuti;
par[2].Value = tm.jieshao;
int a = DB.ExcuteNonQueryReturn(ct, "更新_条目", par);
return a;
}