<asp:ObjectDataSource ID="GridViewODS" runat="server" TypeName="Gongzhen.Components.BusinessDetails"
SelectMethod="GetBusinessDetailsByFielID" UpdateMethod="UpdateBusinessDetail"
DataObjectTypeName="Gongzhen.Components.BusinessDetail" DeleteMethod="DeleteBusinessDetail"
EnableViewState="False">
<SelectParameters>
<asp:Parameter Name="fileID" Type="Int32" />
<asp:Parameter Name="skinType" Type="Object" />
<asp:ControlParameter ControlID="BusinessGridView" Name="AddNewDetails" PropertyName="AddNewDetails" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
</asp:ObjectDataSource>
在public static CreateStatus DeleteBusinessDetail(BusinessDetail businessDetail)里跟踪时发现这种情况下只有primary key被负值了.
SelectMethod="GetBusinessDetailsByFielID" UpdateMethod="UpdateBusinessDetail"
DataObjectTypeName="Gongzhen.Components.BusinessDetail" DeleteMethod="DeleteBusinessDetail"
EnableViewState="False">
<SelectParameters>
<asp:Parameter Name="fileID" Type="Int32" />
<asp:Parameter Name="skinType" Type="Object" />
<asp:ControlParameter ControlID="BusinessGridView" Name="AddNewDetails" PropertyName="AddNewDetails" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
</asp:ObjectDataSource>
在public static CreateStatus DeleteBusinessDetail(BusinessDetail businessDetail)里跟踪时发现这种情况下只有primary key被负值了.