我自定义的更新函数如下:
public void UpdatePostil(?)
{
string strConn=ConfigurationSettings.AppSettings["strConnection"];
SqlConnection myCn=new SqlConnection(strConn);
SqlCommand myCm=new SqlCommand("Update_OverTime",myCn);
myCm.CommandType =CommandType.StoredProcedure ; myCm.Parameters.Add(new SqlParameter("@OT_NO",SqlDbType.Int,4));
myCm.Parameters["@OT_NO"].Value = sql; if (this.RBagree.Checked == true)
this.Label1.Text = "1";
else if (this.RBnoagree.Checked == true)
this.Label1.Text = "0"; myCm.Parameters.Add(new SqlParameter("@OT_tag",SqlDbType.Int,4));
myCm.Parameters["@OT_tag"].Value =this.Label1.Text; myCm.Parameters.Add(new SqlParameter("@OT_ManNotion",SqlDbType.VarChar,500));
myCm.Parameters["@OT_ManNotion"].Value =this.maneger.Text.Trim(); try
{
myCn.Open() ;
myCm.ExecuteNonQuery() ;
 
}
catch(System.Data.SqlClient.SqlException er)
{
throw new  Exception(er.Message);
}
finally
{
myCm.Dispose() ;
myCn.Close() ;
}
}
OT_NO字段在数据库里是递增的,我想根据OT_NO这个字段调用自定义的更新函数来更新OT_tag,OT_ManNotion两个字段,我的问题是我不知道应该在自定义的更新函数的参数里放什么值?
调用的时候括号里的参数又是什么值?
UpdatePostil(?)
请大家帮我解答一下?谢谢!!!