datalist结合objectdatasource的代码问题
//点击更新按钮protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)
{
job = new Model.Job_Model();
job.Job_id = 1;
job.Job_desc = "desc";
job.Min_lvl = 20;
job.Max_lvl = 200;
ObjectDataSource1.Update();
}
//objectdatasource的事件
protected void ObjectDataSource1_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
//代码怎么写?
}
//BLL层需要调用的方法
public bool Update_BLL(Model.Job_Model job)
{
jobdal = new DAL.Job_DAL();
return jobdal.Update_Job_Dal(job);
}
中间那个代码怎么写 ?怎么吧job对象加到objectdatasource的更新参数里边。