00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 using System;
00013 using Mcs.Epm.MicrosoftProject.mpFx.AdminWebService;
00014 using Mcs.Epm.MicrosoftProject.mpFx.TimesheetWebService;
00015
00016 namespace Mcs.Epm.MicrosoftProject.mpFx
00017 {
00018 public class Timesheets
00019 {
00020 private ProjectServer Parent { get; set; }
00021
00022 internal Timesheets(ProjectServer parent)
00023 {
00024 if (parent == null)
00025 {
00026 throw new ArgumentNullException("parent");
00027 }
00028
00029 Parent = parent;
00030 }
00031
00032 public TimesheetLineClassDataSet GetClassifications(LineClassType lineClassType, LineClassState lineClassState)
00033 {
00034 return Parent.WebServices.Administration.ReadLineClasses(lineClassType, lineClassState);
00035 }
00036
00037 public void UpdateTimesheetClassifications(TimesheetLineClassDataSet lineClassDataSet)
00038 {
00039 Parent.WebServices.Administration.UpdateLineClasses(lineClassDataSet);
00040 }
00041
00042 public TimePeriodDataSet ReadPeriods()
00043 {
00044
00045 return Parent.WebServices.Administration.ReadPeriods(PeriodState.All);
00046 }
00047
00048 public TimesheetDataSet GetPreviousTimeSheet(Guid resourceGuid, Guid periodGuid)
00049 {
00050 return Parent.WebServices.Timesheet.ReadTimesheetByPeriod(resourceGuid, periodGuid, Navigation.Previous);
00051 }
00052
00053 public TimesheetDataSet ReadTimesheet(Guid timsheetGuid)
00054 {
00055 return Parent.WebServices.Timesheet.ReadTimesheet(timsheetGuid);
00056 }
00057
00058 public void QueueUpdateTimesheet(Guid jobGuid, Guid timsheetGuid, TimesheetDataSet timesheetDataSet)
00059 {
00060 Parent.WebServices.Timesheet.QueueUpdateTimesheet(jobGuid, timsheetGuid, timesheetDataSet);
00061 }
00062
00063 public void PrepareTimesheetLine(Guid timesheetGuid, ref TimesheetDataSet timesheetDataset, Guid[] linesToFile)
00064 {
00065 Parent.WebServices.Timesheet.PrepareTimesheetLine(timesheetGuid, ref timesheetDataset, linesToFile);
00066 }
00067 }
00068 }