310 likes | 407 Views
About Me. I have been working with sharepoint since 2008 My blog: http://www.greenroomsolutions.ca/blog / Email: kdube@cityoflangford.ca My spare time:. Timesheet System Integration. Background . City of Langford has a homegrown ASP.NET timesheet system
E N D
About Me • I have been working with sharepoint since 2008 • My blog: http://www.greenroomsolutions.ca/blog/ • Email: kdube@cityoflangford.ca • My spare time:
Background • City of Langford has a homegrown ASP.NET timesheet system • Allows staff to enter there time on a daily basis. Time entry is recorded on a project by project basis • The times system exports a file which is imported into our Payroll ERP System (Great Plains)
Background Cont. • System has its own SQL server database
Background Cont. • Projects assigned to each employee are configurable. • Each user is assigned a supervisor in the system.
Approval Process • In the “old days” • People would print out there timesheet get their supervisor to sign it and submit it to the payroll department • Purely a paper process
Integration Functionality • Approval done in SharePoint document library • Submit timesheet to SharePoint using SharePoint API • Document tagged with metadata (submitter, date), dropped in Supervisor Folder (with security) • Ability to comment Timesheet
Server API vs CSOM (SP2010) • Pros/Cons
Development History • Originally in SP2007 this system used the Server API (no CSOM available). Required timesheet website to run on sharepoint server. • In migration to SP2010 CSOM became available. Switched to this API so timesheet not coupled to sharepoint server
Pseudocode • Generate report (already existing), byte array • Connect to sharepoint site, list • Query for supervisor folder IF it doesn’t exist then create it first • Upload to supervisor folder • Tag with metadata
Generate Report • Using .rdlc (visual studio report designer) to generate report Set it up Render
Connect to the sharepoint site, list Server API (old)
Connect to the sharepoint site, list CSOM (new)
Server API Upload Code CSOM (new)
Timesheet Library • Approve View (data grid format)
Bonus Content • Ever tried to change someones name in sharepoint? • Ever had someone accidentally delete the root site in a site collection?