Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
64 Points
42 Posts
May 22, 2009 08:52 AM|LINK
I found that the method header for UpdateTimeEntry needs to be like this:
public static bool UpdateTimeEntry( string CategoryName, string Description, decimal Duration, DateTime ReportedDate, string UserName, string ProjectName, int Id ) {
This corresponds to a declaration of UpdateParameters in ObjectDataSource UpdateTimeEntry of:
<UpdateParameters> <asp:Parameter Name="Id" Type="Int32" /> <asp:Parameter Name="CategoryName" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Duration" Type="Decimal" /> <asp:Parameter Name="ReportedDate" Type="DateTime" /> <asp:ControlParameter Name="UserName" ControlID="UserList" PropertyName="SelectedValue" Type="String" /> </UpdateParameters>
However, I have made quite some changes to this screen, so it is possible that this is no longer the same as what is in the vanilla starter kit.
If you run it in the debugger, it will tell you the parameter list that it is expecting.
HTH Hyacinth.
Hyacinth Bro...
Member
64 Points
42 Posts
Re: error using edit function
May 22, 2009 08:52 AM|LINK
I found that the method header for UpdateTimeEntry needs to be like this:
public static bool UpdateTimeEntry( string CategoryName, string Description, decimal Duration, DateTime ReportedDate, string UserName, string ProjectName, int Id ) {This corresponds to a declaration of UpdateParameters in ObjectDataSource UpdateTimeEntry of:
<UpdateParameters> <asp:Parameter Name="Id" Type="Int32" /> <asp:Parameter Name="CategoryName" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Duration" Type="Decimal" /> <asp:Parameter Name="ReportedDate" Type="DateTime" /> <asp:ControlParameter Name="UserName" ControlID="UserList" PropertyName="SelectedValue" Type="String" /> </UpdateParameters>However, I have made quite some changes to this screen, so it is possible that this is no longer the same as what is in the vanilla starter kit.
If you run it in the debugger, it will tell you the parameter list that it is expecting.
HTH Hyacinth.