Monday, 17 January 2011

Timesheet solution for SharePoint 2010 - Part 2 UI

Problem: Using the database design from Part 1, I need to create the UI for users to submit timesheets.  The screen to capture the users timesheet looks like this:

Related posts in this series:
Part 1 - Design & data storage
Part 2 - Building the UI(This blog post)
Part 3 - Installation Steps 
Part 4 - Final Part

Part 2 Continued...

Initial Hypothesis:  Create 4 connect web parts to allow users to submit their timesheets weekly.  Also allow site collection administrators to submit timesheets for users.  The web parts will also allow administrators to approve or reject the timesheet.
Resolution: Create 4 connected web parts to display user timesheets on a page.  Use the dialog framework to add and edit tasks.  The ability to add a new task is done in another web part on a separate page.  The edit task allows users to edit or delete and existing task, this is another custom web part place on a separate page within the site collection.

Create a web parts to perform basic administration options.  I have create 3 administration web parts within Visual studio to allow administrators to update key timesheet information such as adding new client or projects or assigning people to a project.

Reporting for the timesheet can be created using either: Reporting Services and integrated into SharePoint, BCS to query data, or custom web parts.
Part 1 - Design & data storage
Part 2 - Building the UI (This blog post)
Part 3 - Installation Steps 
Part 4 - Final Part


Anonymous said...

not properly explained hard to follow

Paul Beck said...

These posts are a starting point to implementing your own timesheet application within SharePoint 2010 and therefor the posts have some level of complexity so you can get started.

I have tried to make it easy to follow and provide sufficient data that the solution is explained.

Pls highlight the area/s that you are stuggling to follow and I will clarify them either via comments or in the post itself.

Do you feel this post should be simpler, more detail or just re-worded?

Nico de Jong said...

I think anonymous meant that there are no description of which webparts were used and how they were configured not any guidance on creating tables or any code posted which does something..



kal said...

paul, i was able to implement most of the steps but its not working, im getting error

System.ArgumentNullException: Value cannot be null. Parameter name: fileOrServerOrConnection at System.Data.Linq.DataContext..ctor(String fileOrServerOrConnection, MappingSource mapping) at PaulBeck.Timesheet.TSDBDataContext..ctor(String connection) at PaulBeck.Timesheet.WebParts.Admin.EditProject.EditProjectUserControl.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.AddedControl(Control control, Int32 index) at PaulBeck.Timesheet.WebParts.Admin.EditProject.EditProject.Crea... 670432ad-bc97-48f3-845e-8b41f2a19102

thats from the log,

any comments

Paul Beck said...

Hi Kal,

This looks like you connection string to your SQL instance is not correct.

In you Web.config in the "appSetting" section check the "ConnectionInfo" elements attribute settings. The post assumes you are using windows interated security of SQL Server and it's on the local machine. Ammend according to your environment.

kal said...

Thanks Paul, you are right i fixed the connection string and its working, but the time sheet page is generating error which i think im missing the seed data. i noticed others having the same problem and trying the suggested solutions. tried to put some data in all tables but that didnt work, so im modifying the code.


kal said...

Hi Paul,

i tried making the changes to the code to use SingleOrDefaul instead of Single and try catch still with no luck

here is the error im getting now

System.NullReferenceException: Object reference not set to an instance of an object. at PaulBeck.Timesheet.WebParts.Week.Week.get_GetWeekId() at PaulBeck.Timesheet.WebParts.BookTime.BookTime.ReceiveProvider(IWeekId p)

Any suggestions?

Thanks a lot

Paul Beck said...

Hi Kal,

The issue is the seed data needs to have the appropriate foreign keys. As you say, the best idea is to debug the code and add error trapping to the code before relasing it.


Hammoudeh said...

I found InfoPath an effective reporting solution in many cases

Post a Comment