77using System . ServiceModel . Activation ;
88using System . ServiceModel . Web ;
99using Microsoft . Practices . Unity ;
10- using PMTools . Services . InputValidation ;
10+
1111using Microsoft . Http ;
1212using Microsoft . Http . Headers ;
1313using System . Runtime . Serialization . Json ;
@@ -27,41 +27,11 @@ public ProjectsService()
2727
2828 }
2929
30- [ Description ( "Save Project PL." ) ]
31- [ WebGet ( UriTemplate = "SaveProjectPL/projectId={projectId}&perd={perd}&pl={pl}&costType={costType}&fpc={fpc}&insertDelete={insertDelete}&userID={userID}" ) ]
32- public int ? SaveProjectPL ( string projectId , string perd , string pl , string costType , string fpc , string insertDelete , string userID )
33- {
34- .. .
35- .. .
36- var saveProjectTransaction = ProjectRepo . SaveProjectPL ( plItem ) ;
37-
38- if ( saveProjectTransaction . Status == ResultStatus . Error )
39- {
40- Logger . Error . Log ( string . Format ( ) ) ;
41- throw new WebFaultException ( HttpStatusCode . InternalServerError ) ;
42- }
43-
44- return saveProjectTransaction . Data ;
45- }
4630
47- [ Description ( "Get Project Summaries based on Filter Criteria." ) ]
48- [ WebGet ( UriTemplate = "Summaries/{employeeId}/?drilldown={drilldown}&roleId={roleId}&year={year}&statusIds={statusIds}&bow={bowFlag}" ) ]
49- public IEnumerable < ProjectSummary > GetProjectSummaries ( string employeeId , bool drilldown , string roleId ,
50- string year , string statusIds , bool bowFlag )
51- {
52-
53- .. .
54- .. .
55-
56- //TODO: Artificially limited due to web service not supporting massive record sets. Work in progress
57- return projectSummariesTransaction . Data . Take ( 5000 ) ;
58- }
59-
60-
61- [ Description ( "Gets a list of project using query on project id, project name and project manager." ) ]
62- [ WebGet ( UriTemplate = "Search/?projectId={projectId}&projectName={projectName}&projectManager={projectManager}" ) ]
63- public IEnumerable < ProjectSearchList > GetProjects ( string projectId , string projectName ,
64- string projectManager )
31+ [ Description ( "" ) ]
32+ [ WebGet ( UriTemplate = "Search/?projectId={p1}&projectName={p2}&projectManager={p3}" ) ]
33+ public IEnumerable < ProjectSearchList > GetProjects ( string p1 , string p2 ,
34+ string p3 )
6535 {
6636
6737 var GetProjectsTransaction = ProjectRepo . ProjectSearchList ( projectId , projectName ,
@@ -72,20 +42,11 @@ public IEnumerable<ProjectSearchList> GetProjects(string projectId, string proje
7242 return GetProjectsTransaction . Data ;
7343 }
7444
75- [ Description ( "Gets a list of FPC Codes for a Project PL" ) ]
76- [ WebGet ( UriTemplate = "ProjectFPCs/{projectId}/{projectPl}/{projectYear}" ) ]
77- public IEnumerable < ProjectPL > GetProjectFPCs ( string projectId , string projectPl , string projectYear )
78- {
79- var GetProjectsTransaction = ProjectRepo . ProjectFPCs ( int . Parse ( projectId ) , projectPl , projectYear ) ;
80- IEnumerable < ProjectPL > plList = GetProjectsTransaction . Data . ToList ( ) ;
81- return plList ;
82- }
83-
8445 [ Description ( "Get SOW Details for SOW ID & Year." ) ]
85- [ WebGet ( UriTemplate = "SOWDetails/{SowID }/{year }" ) ]
86- public SOWDetails GetSOWDetails ( string SowID , string year )
46+ [ WebGet ( UriTemplate = "<name>/{p1 }/{p2 }" ) ]
47+ public SOWDetails Get ( string p1 , string p2 )
8748 {
88- var sowDetailsTransaction = ProjectRepo . GetSOWDetails ( SowID , year ) ; //call data repository class here
49+ var sowDetailsTransaction = //call data repository class here
8950
9051 if ( sowDetailsTransaction . Status == ResultStatus . Error )
9152 {
0 commit comments