public void GetInquirySubjectWithInquirers(Action <List <InquirySubjectWithInquirersDTO>, Exception> action, long periodId, long jobPositionId)
        {
            var url = string.Format(baseAddress + makeJobPositionInquirySubjectsApiAdress(periodId, jobPositionId) + "?Include=Inquirers");

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void AssignJobPositionsToEmployee(Action <EmployeeJobPositionsDTO, Exception> action, long periodId, string employeeNo,
                                                 EmployeeJobPositionsDTO employeeJobPositions)
        {
            var url = string.Format(baseAddress + makeEmployeeJobPositionsApiAdress(periodId, employeeNo));

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, employeeJobPositions, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void GetAllEmployees(Action <List <EmployeeDTO>, Exception> action, long periodId)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId));

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #4
0
        public void UpdateJob(Action <JobDTO, Exception> action, JobDTO job)
        {
            var url = string.Format(apiAddress + "?Id=" + job.Id);

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, job, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void UpdateEmployee(Action <EmployeeDTO, Exception> action, EmployeeDTO employee)
        {
            var url = string.Format(baseAddress + makeApiAdress(employee.PeriodId));

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, employee, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #6
0
        public void GetAllJobs(Action <IList <JobDTO>, Exception> action)
        {
            var url = string.Format(apiAddress);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #7
0
        public void GetJob(Action <JobDTO, Exception> action, long id)
        {
            var url = string.Format(apiAddress + "?Id=" + id);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #8
0
        public void CopyBasicDataFrom(Action <Exception> action, long sourcePeriodId, long destinationPeriodId, PeriodStateDTO state)
        {
            var url = string.Format(baseAddressCopyBasicData) + "/" + sourcePeriodId + "/DestinationPeriods/" + destinationPeriodId + "/State";

            WebClientHelper.Put <PeriodStateDTO, PeriodStateDTO>(new Uri(url, UriKind.Absolute),
                                                                 (res, exp) => action(exp), state, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #9
0
        public void RollBackPeriodState(Action <Exception> action, long periodId)
        {
            var url = string.Format(baseAddress) + "/" + periodId + "/State/?dummy='rollback'";

            WebClientHelper.Put <string, string>(new Uri(url, UriKind.Absolute),
                                                 (res, exp) => action(exp), "rollback", PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #10
0
        public void UpdateJobPosition(Action <JobPositionDTO, Exception> action, JobPositionDTO jobPosition)
        {
            var url = string.Format(baseAddress);

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, jobPosition, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #11
0
        public void ChangePeriodState(Action <Exception> action, long id, PeriodStateDTO period)
        {
            var url = string.Format(baseAddress) + "/" + id + "/State";

            WebClientHelper.Put <PeriodStateDTO, PeriodStateDTO>(new Uri(url, UriKind.Absolute),
                                                                 (res, exp) => action(exp), period, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #12
0
        public void DeleteJobPosition(Action <string, Exception> action, long id)
        {
            var url = string.Format(baseAddress + "?Id=" + id);

            WebClientHelper.Delete(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void GetJobPositionInPeriod(Action <JobPositionInPeriodAssignmentDTO, Exception> action, long periodId, long jobPositionId)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) + "?jobPositionId=" + jobPositionId);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void UpdateInquirySubjectInquirers(Action <InquirySubjectWithInquirersDTO, Exception> action, long periodId, long jobPositionId,
                                                  InquirySubjectWithInquirersDTO inquirySubjectWithInquirersDTO)
        {
            var url = string.Format(baseAddress + makeInquirySubjectInquirersApiAdress(periodId, jobPositionId, inquirySubjectWithInquirersDTO.EmployeeNo) + "?Batch=1");

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, inquirySubjectWithInquirersDTO, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #15
0
        public void GetCurrentPeriod(Action <PeriodDTO, Exception> action)
        {
            var url = string.Format(baseAddress + "?Active=1");

            WebClientHelper.Get(new Uri(url, UriKind.Absolute), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #16
0
        public void GetPeriodsWithConfirmedResult(Action <ObservableCollection <PeriodDescriptionDTO>, Exception> action)
        {
            var url = string.Format(baseAddress + "?hasConfirmedResult=1");

            WebClientHelper.Get(new Uri(url, UriKind.Absolute), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #17
0
        public void GetAllJobs(Action <PageResultDTO <JobDTOWithActions>, Exception> action, int pageSize, int pageIndex, Dictionary <string, string> sortBy)
        {
            var url = string.Format(apiAddress + "?PageSize=" + pageSize + "&PageIndex=" + pageIndex);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #18
0
        public void GetEmployeeResultInPeriod(Action <EmployeeResultDTO, Exception> action, long periodId, string employeeNo)
        {
            var url = string.Format(baseAddress + "?periodId=" + periodId + "&employeeNo=" + employeeNo);

            WebClientHelper.Get(new Uri(url, UriKind.Absolute), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #19
0
        public void GetJobCustomFields(Action <List <AbstractCustomFieldDescriptionDTO>, Exception> action, long id)
        {
            var url = string.Format(apiAddress);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #20
0
        //todo: bad webapi arrangement for below three methods( Iam so sorry for myself )
        public void GetSubordinatesResultInPeriod(Action <SubordinatesResultDTO, Exception> action, long periodId, string managerEmployeeNo)
        {
            var url = string.Format(baseAddress + "?periodId=" + periodId + "&managerEmployeeNo=" + managerEmployeeNo + "&isForManager=true");

            WebClientHelper.Get(new Uri(url, UriKind.Absolute), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #21
0
 public void AddJob(Action <JobDTO, Exception> action, JobDTO job)
 {
     WebClientHelper.Post(new Uri(apiAddress, PMSClientConfig.UriKind), action, job, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
 }
Exemple #22
0
        public void GetTrainingEmployeeIndicesInPeriod(Action <List <JobIndexValueDTO>, Exception> action, long periodId, string trainerEmployeeNo)
        {
            var url = string.Format(baseAddress + "?periodId=" + periodId + "&isForTrainer=yes");

            WebClientHelper.Get(new Uri(url, UriKind.Absolute), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void DeleteEmployee(Action <string, Exception> action, long periodId, string personnelNo)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) + "?PersonnelNo=" + personnelNo);

            WebClientHelper.Delete(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #24
0
        public void GetTrainingNeedEmployeeInPeriod(Action <SubordinatesResultDTO, Exception> action, long periodId, string trainerEmployeeNo, long jobIndexId)
        {
            var url = string.Format(baseAddress + "?periodId=" + periodId + "&jobindexId=" + jobIndexId);

            WebClientHelper.Get(new Uri(url, UriKind.Absolute), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void GetEmployeeUnitsInPeriod(Action <EmployeeUnitsDTO, Exception> action, string employeeNo, long periodId)
        {
            var url = string.Format(baseAddress + makeEmployeeUnitsApiAdress(periodId, employeeNo));

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #26
0
        public void DeletePeriod(Action <string, Exception> action, long id)
        {
            var url = string.Format(baseAddress + "?Id={0}", id);

            WebClientHelper.Delete(new Uri(url, UriKind.Absolute), action, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void GetAllEmployees(Action <PageResultDTO <EmployeeDTOWithActions>, Exception> action, long periodId, int pageSize, int pageIndex)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) + "?PageSize=" + pageSize + "&PageIndex=" + pageIndex);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Exemple #28
0
        public void UpdatePeriod(Action <PeriodDTO, Exception> action, PeriodDTO period)
        {
            var url = string.Format(baseAddress);

            WebClientHelper.Put(new Uri(url, UriKind.Absolute), action, period, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void GetSubordinatesEmployees(Action <PageResultDTO <EmployeeDTOWithActions>, Exception> action, string managerEmployeeNo, long periodId, EmployeeCriteria employeeCriteria,
                                             int pageSize, int pageIndex)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) + "?verifierEmployeeNo=" + managerEmployeeNo + "&PageSize=" + pageSize + "&PageIndex=" + pageIndex +
                                    getFilterEmployee(employeeCriteria, "&"));

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
        public void GetJobPositionsWithActions(Action <List <JobPositionInPeriodDTOWithActions>, Exception> action, long periodId)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) + "?Type=JobPositionInPeriodDTOWithActions");

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }