菜鸟,关于DetailsView更新数据的问题
BLL中
**********************
public static ItemInfo Update(string _itemId, string _image, decimal? _listPrice, string _name, string _productId, string _status, int? _supplier, decimal? _unitCost) {.......}
**********************
更新时出现错误
**********************
ObjectDataSource“ObjectDataSource1”未能找到带参数的非泛型方法“Update”: _itemId, _image, _listPrice, _name, _productId, _status, _supplier, _unitCost, ProductId, Image, UnitCost, Supplier, Status, ListPrice, Name, ItemId。
**********************
似乎是参数重复了..可是应该如何取消重复的参数啊..不会搞..
页面中代码
**********************
<asp:DetailsView ID= "DetailsView1 " runat= "server " AutoGenerateEditButton= "True " AutoGenerateRows= "False "
DataSourceID= "ObjectDataSource1 " Height= "50px " Width= "125px " DataKeyNames= "ItemId ">
<Fields>
<asp:BoundField DataField= "ProductId " HeaderText= "ProductId " SortExpression= "ProductId " />
<asp:BoundField DataField= "Image " HeaderText= "Image " SortExpression= "Image " />
<asp:BoundField DataField= "UnitCost " HeaderText= "UnitCost " SortExpression= "UnitCost " />
<asp:BoundField DataField= "Supplier " HeaderText= "Supplier " SortExpression= "Supplier " />
<asp:BoundField DataField= "Status " HeaderText= "Status " SortExpression= "Status " />
<asp:BoundField DataField= "ListPrice " HeaderText= "ListPrice " SortExpression= "ListPrice " />
<asp:BoundField DataField= "Name " HeaderText= "Name " SortExpression= "Name " />
<asp:BoundField DataField= "ItemId " HeaderText= "ItemId " SortExpression= "ItemId " />
</Fields>