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)); }
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)); }
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)); }
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)); }
//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)); }
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)); }
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 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)); }
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)); }
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 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 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 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)); }
//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)); }
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)); }
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)); }
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 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)); }
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)); }
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)); }
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)); }
public void AddJob(Action <JobDTO, Exception> action, JobDTO job) { WebClientHelper.Post(new Uri(apiAddress, PMSClientConfig.UriKind), action, job, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token)); }
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)); }
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 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)); }
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)); }
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)); }
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)); }
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)); }
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)); }