==================
List Projects
==================
My users don't need to see the generated project ID. Our ID is embedded in the names of the project so I wanted to remove the project ID from the GridView.
OLD
<asp:BoundField DataField="Id" Visible=true />
NEW
<asp:BoundField DataField="Id" Visible="false" /> --- or you could delete this line completely like I did.
I then wanted to remove the time from the "Completion" column, especially since it is always midnight.
OLD
<asp:BoundField DataField="CompletionDate" HeaderText="Completion" DataFormatString="{0:d}" SortExpression="CompletionDate" />
NEW
<asp:TemplateField HeaderText="Completion Date" SortExpression="CompletionDate">
<ItemTemplate><%# String.Format("{0:d}", Convert.ToDateTime(Eval("CompletionDate"))) %></ItemTemplate>
</asp:TemplateField>
Next, I was unable to delete a project. Whenever the sub ListAllProjects_RowDeleting() was called (that is, whenever you hit the delete button) it would throw an error at the following line in the code-behind.:
It seems it was trying to add an ID to the row, but the ID was already there. I simply deleted this line.
Now the delete function worked fine (although I haven't checked the DB to make sure all of the staff and hours were deleted, too). I then added a confirmation dialogue box to the delete button.
I followed this and it does indeed delete the project but I don't think it clears the db because when I view a resource report the project name is gone but the hours are still there as well as the categories they were divided into. Any ideas how to fix this?
Thanks for this btw, it has been very helpful so far.
In your item number 3 " Why can I see other people's time entries?"
If you delete the userlist the app is broken because other code is dependent on its selected item, you could replace it with a label and change the dependent code to ref the label.text prop. But also if you create your users with the lowest privledged role
these users would not be able to select any other users time entries or projects they are not assigned to.
In your item number 5 "Why do the time entries show the date I recorded the entry but not the day I did the work?"
Where you changed the bound column for the ReportedDate field to a template so you could get rid of the time portion of the date, the edit functionality is broken by this.
==================
List Projects
==================
My users don't need to see the generated project ID. Our ID is embedded in the names of the project so I wanted to remove the project ID from the GridView.
OLD
<asp:BoundField DataField="Id" Visible=true />
NEW
<asp:BoundField DataField="Id" Visible="false" /> --- or you could delete this line completely like I did.
I then wanted to remove the time from the "Completion" column, especially since it is always midnight.
OLD
<asp:BoundField DataField="CompletionDate" HeaderText="Completion" DataFormatString="{0:d}" SortExpression="CompletionDate" />
NEW
<asp:TemplateField HeaderText="Completion Date" SortExpression="CompletionDate">
<ItemTemplate><%# String.Format("{0:d}", Convert.ToDateTime(Eval("CompletionDate"))) %></ItemTemplate>
</asp:TemplateField>
Next, I was unable to delete a project. Whenever the sub ListAllProjects_RowDeleting() was called (that is, whenever you hit the delete button) it would throw an error at the following line in the code-behind.:
It seems it was trying to add an ID to the row, but the ID was already there. I simply deleted this line.
Now the delete function worked fine (although I haven't checked the DB to make sure all of the staff and hours were deleted, too). I then added a confirmation dialogue box to the delete button.
I followed this and it does indeed delete the project but I don't think it clears the db because when I view a resource report the project name is gone but the hours are still there as well as the categories they were divided into. Any ideas how to fix this?
Thanks for this btw, it has been very helpful so far.
Chris L.
To completely remove the data from the DB, the stored procedure aspnet_starterkits_DeleteProject has to be changed to the following:
>>>>>>>>>>
In your item number 3 " Why can I see other people's time entries?"
If you delete the userlist the app is broken because other code is dependent on its selected item, you could replace it with a label and change the dependent code to ref the label.text prop. But also if you create your users with the lowest privledged role
these users would not be able to select any other users time entries or projects they are not assigned to.
<<<<<<<<<<<<<<
I just set the Enabled property of the UserList drop-down box to False. This is probably not the prettiest option, but definitely the quickest.
enraged
Member
15 Points
3 Posts
Re: Trials and Tribulations of Time Tracker
Mar 16, 2006 09:10 AM|LINK
I followed this and it does indeed delete the project but I don't think it clears the db because when I view a resource report the project name is gone but the hours are still there as well as the categories they were divided into. Any ideas how to fix this? Thanks for this btw, it has been very helpful so far.
Chris L.
jfeyes
Member
10 Points
2 Posts
Re: Trials and Tribulations of Time Tracker
Jun 04, 2006 03:36 PM|LINK
In your item number 3 " Why can I see other people's time entries?"
If you delete the userlist the app is broken because other code is dependent on its selected item, you could replace it with a label and change the dependent code to ref the label.text prop. But also if you create your users with the lowest privledged role these users would not be able to select any other users time entries or projects they are not assigned to.
In your item number 5 "Why do the time entries show the date I recorded the entry but not the day I did the work?"
Where you changed the bound column for the ReportedDate field to a template so you could get rid of the time portion of the date, the edit functionality is broken by this.
Try this instead:
<
asp:TemplateField HeaderText="ReportedDate"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ReportedDate") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("ReportedDate", "{0:d}") %>'></asp:Label> </ItemTemplate> </asp:TemplateField>And thanks for the tip on fixing the security settings in the webconfig that was driving me nuts.
RichardYang
Member
20 Points
4 Posts
Re: Trials and Tribulations of Time Tracker
Jun 13, 2006 03:33 PM|LINK
==================
List Projects
==================
To make sorting works
In Project.vb, Public Shared Function GetAllProjects(ByVal sortParameter As String) As List(Of Project)
change:
If
String.IsNullOrEmpty(sortParameter) ThenTo:
If Not String.IsNullOrEmpty(sortParameter) Then
L.G. Thompso...
Member
5 Points
1 Post
Re: Trials and Tribulations of Time Tracker
Jul 13, 2006 12:03 AM|LINK
You must also update the stored procedure that creates a new TimeEntry.
CREATE PROCEDURE aspnet_starterkits_CreateNewTimeEntry
@CategoryId INT,
@TimeEntryCreatorUserName NVARCHAR(256),
@TimeEntryDescription NVARCHAR(1000),
@TimeEntryEstimateDuration DECIMAL(18,2),
@TimeEntryEnteredDate DATETIME,
@TimeEntryUserName NVARCHAR(256)
AS
Jessmmy
Member
341 Points
164 Posts
Re: Trials and Tribulations of Time Tracker
Jul 14, 2006 06:20 AM|LINK
Anyone knows how to apply the foreign key constaints in the tables of aspnetdb from the timetracker database?
From the script, it has the foreign key relation between user table and project table.
Simster
Member
30 Points
6 Posts
Re: Trials and Tribulations of Time Tracker
Jul 27, 2006 12:49 PM|LINK
To completely remove the data from the DB, the stored procedure aspnet_starterkits_DeleteProject has to be changed to the following:
ALTER
PROCEDURE [dbo].[aspnet_starterkits_DeleteProject]@ProjectIdToDelete
INTAS
DELETE
FROM aspnet_starterkits_TimeEntry WHERE CategoryId = @ProjectIdToDeleteSELECT
* FROM aspnet_starterkits_TimeEntryDELETE
FROM aspnet_starterkits_ProjectMembers WHERE ProjectId = @ProjectIdToDeleteSELECT
* FROM aspnet_starterkits_ProjectMembersDELETE
FROM aspnet_starterkits_ProjectCategories WHERE ProjectId = @ProjectIdToDeleteSELECT
* FROM aspnet_starterkits_ProjectCategoriesDELETE
FROM aspnet_starterkits_Projects WHERE ProjectId = @ProjectIdToDeleteSELECT
* FROM aspnet_starterkits_ProjectsThis will reove all signs of the project including hours.
-John
Noyabronok
Member
5 Points
1 Post
Re: Trials and Tribulations of Time Tracker
Aug 14, 2006 04:53 PM|LINK
In your item number 3 " Why can I see other people's time entries?"
If you delete the userlist the app is broken because other code is dependent on its selected item, you could replace it with a label and change the dependent code to ref the label.text prop. But also if you create your users with the lowest privledged role these users would not be able to select any other users time entries or projects they are not assigned to.
<<<<<<<<<<<<<<
I just set the Enabled property of the UserList drop-down box to False. This is probably not the prettiest option, but definitely the quickest.
rajuonline_5...
Member
43 Points
42 Posts
Re: Trials and Tribulations of Time Tracker
Apr 25, 2007 10:54 AM|LINK
when i select a particular project in the resource report the consultants should change dynamically
means only those consultants should appear which are assigned to that project by the administrator/ project manager .
can anyone solve my problem.
please mail the source code.
TIMe Tracker Resource report problem
chetan.sarod...
All-Star
65749 Points
11148 Posts
Re: Trials and Tribulations of Time Tracker
Apr 26, 2007 03:37 AM|LINK
Yes, so that it can accept the hour in decimal format
no rounding problem ...
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
chetan.sarod...
All-Star
65749 Points
11148 Posts
Re: Trials and Tribulations of Time Tracker
Apr 28, 2007 04:22 AM|LINK
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.