Error when editing time entry

Last post 01-16-2008 10:31 PM by chetan.sarode. 2 replies.

Sort Posts:

  • Error when editing time entry

    12-30-2007, 2:42 AM
    • Participant
      843 point Participant
    • NoBullMan
    • Member since 06-28-2006, 5:27 PM
    • Virginia
    • Posts 551

    When I edit an entry in the time entry gridview and click on save image button to update the entry, I get:

    ObjectDataSource 'ProjectListDataSource' could not find a non-generic method 'UpdateTimeEntry' that has parameters: CategoryName, Duration, ReportedDate, LogDate, UserName, ProjectName, Description, Id.

    I don't know where it is getting the ProjectName parameter for updating. The Update method does not list a ProjectName either. This is the Datasource:

    <asp:ObjectDataSource

    ID="ProjectListDataSource"

    runat="server"

    TypeName="ASPNET.StarterKit.BusinessLogicLayer.TimeEntry"

    SelectMethod="GetTimeEntriesByUserNameAndDates"

    DeleteMethod="DeleteTimeEntry"

    UpdateMethod="UpdateTimeEntry"

    OldValuesParameterFormatString="{0}">

    <DeleteParameters>

    <asp:Parameter Name="Id" Type="Int32" />

    </DeleteParameters>

    <SelectParameters>

    <asp:ControlParameter Name="userName" ControlID="UserList" PropertyName="SelectedValue"

    Type="String" />

    <asp:ControlParameter Name="startingDate" ControlID="WeekEnding2" PropertyName="Text"

    Type="DateTime" />

    <asp:ControlParameter Name="endDate" ControlID="WeekEnding2" PropertyName="Text"

    Type="DateTime" />

    </SelectParameters>

    <UpdateParameters>

    <asp:Parameter Name="Id" Type="Int32" />

    <asp:Parameter Name="CategoryName" Type="String" />

    <asp:Parameter Name="Duration" Type="Decimal" />

    <asp:Parameter Name="ReportedDate" Type="DateTime" />

    <asp:Parameter Name="LogDate" Type="string" />

    <asp:ControlParameter Name="UserName" ControlID="UserList" PropertyName="SelectedValue" Type="String" />

    </UpdateParameters>

    </asp:ObjectDataSource>

  • Re: Error when editing time entry

    12-30-2007, 10:31 PM
    Answer
    • Participant
      843 point Participant
    • NoBullMan
    • Member since 06-28-2006, 5:27 PM
    • Virginia
    • Posts 551

    I had to overload UpdateTimeEntry(...) with the missing parameters.

  • Re: Error when editing time entry

    01-16-2008, 10:31 PM

    Yes you are right

    You have to overload UpdateTimeEntry()

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
Page 1 of 1 (3 items)