You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm_moe/Mohem/src/app/reports/report-service.service.ts

50 lines
1.7 KiB
TypeScript

4 years ago
import { Injectable } from '@angular/core';
import { AuthenticationService } from '../hmg-common/services/authentication/authentication.service';
import { CommonService } from '../hmg-common/services/common/common.service';
import { ConnectorService } from '../hmg-common/services/connector/connector.service';
@Injectable({
providedIn: 'root'
})
export class ReportServiceService {
public static GET_CONCURRENT_PROGRAM = 'Services/ERP.svc/REST/GET_CONCURRENT_PROGRAMS';
public static GET_CPP_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_CCP_DFF_STRUCTURE';
public static SUBMIT_CPP_REQUEST = 'Services/ERP.svc/REST/SUBMIT_CCP_TRANSACTION'
constructor(
public con: ConnectorService,
private authService: AuthenticationService,
public cs: CommonService
) { }
getConcurrentProgram(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CONCURRENT_PROGRAM,
request,
onError,
errorLabel
);
}
getCPPDiffStructure(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CPP_DIFF_STRUCTURE,
request,
onError,
errorLabel
);
}
submitTransaction(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.SUBMIT_CPP_REQUEST,
request,
onError,
errorLabel
);
}
}