Example #1
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));
        }
Example #2
0
        public void GetInquiryFormByJobIndex(Action <InquiryFormByIndexDTO, Exception> action, long periodId, string inquirerEmployeeNo, long jobIndexId)
        {
            var url = string.Format(baseAddress + makeJobIndexPointByIndexApiAdress(periodId, inquirerEmployeeNo, jobIndexId));

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #3
0
        public void UpdateCustomField(Action <CustomFieldDTO, Exception> action, CustomFieldDTO customField)
        {
            var url = string.Format(apiCustomFieldAddress, UriKind.Absolute);

            WebClientHelper.Put(new Uri(url), action, customField, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #4
0
        public void ConfirmEmployeeAboveMaxPoint(Action <Exception> action, string personnelNo, long periodId)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) + "?employeeNo=" + personnelNo);

            WebClientHelper.Put <string, string>(new Uri(url, PMSClientConfig.UriKind), (res, exp) => action(exp), "ConfirmEmployeeAboveMaxPoint", PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #5
0
        //By index
        public void GetInquirerInquiryIndices(Action <List <InquiryIndexDTO>, Exception> action, long periodId, string inquirerEmployeeNo)
        {
            if (periodId == -1)
            {
                action(new List <InquiryIndexDTO>(), null);
            }

            var url = string.Format(baseAddress + makeInquirerInquiryIndexApiAdress(periodId, inquirerEmployeeNo));

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #6
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));
        }
Example #7
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));
        }
Example #8
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));
        }
Example #9
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));
        }
Example #10
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));
        }
Example #11
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));
        }
Example #12
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));
        }
Example #13
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));
        }
Example #14
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));
        }
Example #15
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));
        }
Example #16
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));
        }
Example #17
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));
        }
Example #18
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));
        }
Example #19
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));
        }
Example #20
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));
        }
Example #21
0
        public void GetAllEmployeeNo(Action <List <string>, Exception> action, long periodId, EmployeeCriteria employeeCriteria)
        {
            var url = string.Format(baseAddress + makeApiAdress(periodId) +
                                    getFilterEmployee(employeeCriteria, "?"));

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #22
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));
 }
Example #23
0
        public void ChangeEmployeePoint(Action <Exception> action, EmployeeDTO employee)
        {
            var url = string.Format(baseAddress + makeApiAdress(employee.PeriodId) + "?employeeNo=" + employee.PersonnelNo + "&point=" + employee.FinalPoint);

            WebClientHelper.Put <string, string>(new Uri(url, PMSClientConfig.UriKind), (res, exp) => action(exp), "ChangeEmployeePoint", PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #24
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));
        }
Example #25
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public void GetInquiryForm(Action <InquiryFormDTO, Exception> action, long periodId, string inquirerEmployeeNo, long inquirerJobPositionId, string inquirySubjectEmployeeNo, long jobPositionId)
        {
            var url = string.Format(baseAddress + makeInquirySubjectJobIndexPointApiAdress(periodId, inquirerEmployeeNo, inquirySubjectEmployeeNo, jobPositionId) + "?InquirerJobPositionId=" + inquirerJobPositionId);

            WebClientHelper.Get(new Uri(url, PMSClientConfig.UriKind), action, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #26
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));
        }
Example #27
0
        public void UpdateJobIndexInquiryForm(Action <InquiryFormByIndexDTO, Exception> action, InquiryFormByIndexDTO inquiryForm)
        {
            var url =
                string.Format(baseAddress +
                              makeJobIndexPointByIndexApiAdress(inquiryForm.PeriodId, inquiryForm.InquirerEmployeeNo, inquiryForm.JobIndexId) + "?Batch=1");

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, inquiryForm, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #28
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));
        }
Example #29
0
        public void DeleteCustomField(Action <string, Exception> action, long id)
        {
            var url = string.Format(apiCustomFieldAddress + "?Id=" + id, UriKind.Absolute);

            WebClientHelper.Delete(new Uri(url), action, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #30
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));
        }