//public void Load(JobInPrdField jobInPrdFieldParam, ActionType actionTypeParam) public void Load(long periodId, JobInPeriodDTO jobInPeriod, ActionType actionTypeParam) { if (jobInPeriod == null) { return; } actionType = actionTypeParam; preLoad(periodId); ShowBusyIndicator("در حال دریافت اطلاعات..."); jobService.GetJob((res, exp) => appController.BeginInvokeOnDispatcher(() => { HideBusyIndicator(); if (exp == null) { Job = res; JobCustomFieldDescriptionList = new List <AbstractCustomFieldDescriptionDTO>(Job.CustomFields .Select(f => new AbstractCustomFieldDescriptionDTO() { Name = f.Name, Id = f.Id }).ToList()); jobCustomFieldDescriptionList.Where(allFields => jobInPeriod.CustomFields.Select(f => f.Id).Contains(allFields.Id)) .ToList() .ForEach(field => field.IsChecked = true); } else { appController.HandleException(exp); } }), jobInPeriod.JobId); }
private JobDTO GetJob(long ID) { JobDTO Result = new JobDTO(); jobService.GetJob((res, exp) => { if (exp == null) { //System.Threading.Thread.Sleep(100); Result = res; } else { throw new Exception("Error in Get Job From Repository!"); } }, ID); return(Result); }
public void DoAction(JobListVM vm) { jobService.GetJob((res, exp) => pmsController.BeginInvokeOnDispatcher(() => { if (exp == null) { if (res != null) { basicInfoController.ShowJobView(res, ActionType.ModifyJob); } else { pmsController.ShowMessage("اطلاعات شغل جهت ارسال به صفحه ویرایش معتبر نمی باشد"); } } else { pmsController.HandleException(exp); } }), vm.SelectedJob.Id); }
public void Load(JobDTO jobParam, ActionType actionTypeParam) { actionType = actionTypeParam; if (actionType == ActionType.ModifyJob) { ShowBusyIndicator(); jobService.GetJob((res, exp) => appController.BeginInvokeOnDispatcher(() => { HideBusyIndicator(); if (exp == null) { Job = res; } else { appController.HandleException(exp); } }), jobParam.Id); } }