Unable to Edit or Delete Category in TimeTracker

Last post 06-25-2009 10:56 PM by chetan.sarode. 23 replies.

Sort Posts:

  • Re: Unable to Edit or Delete Category in TimeTracker

    10-29-2008, 11:52 PM
    • Member
      52 point Member
    • nightsoul94
    • Member since 07-11-2006, 5:15 PM
    • California
    • Posts 11

    I ran into the same problem with mine.  The Delete category routine has a problem with using the correct id to delete a category.  The update category method is missing an implementations.  I had to make minor modifications to both files to be able to work with the categories properly.  All you need to do is run the project in a debug mode and place break points in both the delete category method and the update category method in the BLL file.  Once you see the problem it should only take you a minute to work out a fix. 

  • Re: Unable to Edit or Delete Category in TimeTracker

    10-30-2008, 12:02 AM

    This is generic solution, If you found the solution post it so other people get benifit

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Unable to Edit or Delete Category in TimeTracker

    06-22-2009, 10:32 AM
    • Member
      6 point Member
    • dwightd
    • Member since 06-22-2009, 1:51 PM
    • Posts 3

    Change one of the contructors as shown below from projectId to ID (The middle one)

    Then over load the Update Category as shown below the previously stated:

    With the following:

    Category.GetCategoryByCategoryId(Id)

    Category.GetCategoryByCategoryId(original_Id);

    public static bool UpdateCategory(string Abbreviation, int original_Id, decimal EstimateDuration, string Name/*, int id*/)

    public static bool UpdateCategory(string Abbreviation, decimal EstimateDuration, string Name, int Id)

    Do the same for Delete:

    /*** CONSTRUCTOR ***/

    public Category(string name, int projectId): this(string.Empty, DefaultValues.GetDurationMinValue(), DefaultValues.GetCategoryIdMinValue(), DefaultValues.GetDurationMinValue(), name, projectId) {

    }

    public Category(string abbreviation, decimal estimateDuration, string name, int Id)

    : this(abbreviation, DefaultValues.GetDurationMinValue(), DefaultValues.GetCategoryIdMinValue(), estimateDuration, name, Id) {

    }

    public Category(string abbreviation, decimal actualDuration, int id, decimal estimateDuration, string name, int projectId) {

    if (String.IsNullOrEmpty(name))

    throw (new NullReferenceException("name"));

    if (projectId <= DefaultValues.GetProjectIdMinValue())

    throw (new ArgumentOutOfRangeException("projectId"));

    _Abbreviation = abbreviation;

    _ActualDuration = actualDuration;

    _Id = id;

    _EstimateDuration = estimateDuration;

    _Name = name;

    _ProjectId = projectId;

    }

     

    ______________________________________________________________________________________________________

    public static bool UpdateCategory(string Abbreviation, int original_Id, decimal EstimateDuration, string Name/*, int id*/) {

    if (String.IsNullOrEmpty(Name))

    throw (new NullReferenceException("Name"));

     

    Category updateCategory = Category.GetCategoryByCategoryId(original_Id);if (updateCategory != null) {

    updateCategory.Abbreviation = Abbreviation;

    updateCategory.EstimateDuration = EstimateDuration;

    updateCategory.Name = Name;

    return (updateCategory.Save());

    }

    else

    return false;

    }

    public static bool UpdateCategory(string Abbreviation, decimal EstimateDuration, string Name, int Id)

    {

    if (String.IsNullOrEmpty(Name))throw (new NullReferenceException("Name"));

     

    Category updateCategory = Category.GetCategoryByCategoryId(Id);

    if (updateCategory != null)

    {

    updateCategory.Abbreviation = Abbreviation;

    updateCategory.EstimateDuration = EstimateDuration;

    updateCategory.Name = Name;

    return (updateCategory.Save());

    }

    else

    return false;

    }

  • Re: Unable to Edit or Delete Category in TimeTracker

    06-22-2009, 11:21 PM

    You have to overload appropriate method with the missing parameters.

    http://forums.asp.net/t/1199275.aspx

     

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Unable to Edit or Delete Category in TimeTracker

    06-23-2009, 8:53 AM
    • Member
      6 point Member
    • dwightd
    • Member since 06-22-2009, 1:51 PM
    • Posts 3

     Do you have a version that has all of the fixed bugs in C# please?

    It looks like the forum only supports VB.

    Would appreciate your help.

    Please

    thanks you in advance

    Dwight DePass

  • Re: Unable to Edit or Delete Category in TimeTracker

    06-23-2009, 11:00 PM
    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Unable to Edit or Delete Category in TimeTracker

    06-24-2009, 10:51 PM

    Have you looked at Time Tracker Community Edition 

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Unable to Edit or Delete Category in TimeTracker

    06-25-2009, 9:15 AM
    • Member
      6 point Member
    • dwightd
    • Member since 06-22-2009, 1:51 PM
    • Posts 3

    I did but this was in VB not in C#


    I did take a look at the other link you provided. Thou it was in VB it gave me a understanding of what to fix for some bugs.

    I was just wondering if there was a copy or if you had an individual copy of a C# version.

    If you do it would be appreciated.

    Thanks for the follow up I do appreciate that.

    Could I also talk to you about other issues I may have in the future.

    Thank you in advance

    Dwight DePass


  • Re: Unable to Edit or Delete Category in TimeTracker

    06-25-2009, 10:56 PM

     Sure. You can always convert this VB.NET code into C#. There are lots of tool availableon the net to convert VB to C# code

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
Page 2 of 2 (24 items) < Previous 1 2