
@now_id int,
@upside_id int
AS
declare @tmp_ordering int --临时变量
declare @sqlstr varchar(1000) --sql语句
declare @table_name varchar(500)
declare @column_name varchar(500)
set @column_name='deptID'
update '+@table_name+' set ordering=(select ordering from '+@table_name+' where '+@column_name+'='+convert(varchar(50),@upside_id)+')
where
update '+@table_name+' set ordering = '+convert(varchar(50),@tmp_ordering)+'
where outstr += "alert('" + message + "');";
outstr += "</script>";
Response.Write(outstr);
}
<ItemStyle Width="40px" />
</asp:ButtonField>
<asp:ButtonField CommandName="row_down" Text="下移">
<ItemStyle Width="40px" />
</asp:ButtonField>
{
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(sp_Name, conn);
if (conn.State.ToString() == "Closed")
conn.Open();
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add(para_name2, SqlDbType.Int, 4).Value = value_2;
try
{
cmd.ExecuteNonQuery();
}
catch (SqlException ex)
{
throw new Exception(ex.Message.ToString());