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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #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));
        }
예제 #5
0
        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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
 }
예제 #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));
        }
예제 #23
0
        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));
        }
예제 #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));
        }
예제 #25
0
        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));
        }
예제 #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));
        }
예제 #27
0
        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));
        }
예제 #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));
        }
예제 #29
0
        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));
        }