Example #1
0
        public void ShowInquiryFormView(InquiryFormDTO inquiryForm, ActionType action)
        {
            var view = ServiceLocator.Current.GetInstance <IInquiryFormView>();

            ((InquiryFormVM)view.ViewModel).Load(inquiryForm, action);
            viewManager.ShowInDialog(view);
        }
Example #2
0
 public void Load(InquiryFormDTO inquiryFormDTOParam, ActionType actionTypeParam)
 {
     periodId    = inquiryFormDTOParam.PeriodId;
     actionType  = actionTypeParam;
     InquiryForm = inquiryFormDTOParam;
     DisplayName = "فرم ارزیابی" + " ";
     foreach (var jobIndexValueDTO in InquiryForm.JobIndexValueList)
     {
         jobIndexValueDTO.Grades = fillGradesList();
     }
 }
Example #3
0
        public InquiryFormDTO UpdateInquirySubjectForm(InquiryFormDTO inquiryForm)
        {
            inquiryService.UpdateInquiryJobIndexPoints(
                inquiryForm.JobIndexValueList.Select(
                    j => new InquiryJobIndexPoinItem(new JobPositionInquiryConfigurationItemId(
                                                         new JobPositionId(new PeriodId(inquiryForm.PeriodId),
                                                                           new SharedJobPositionId(inquiryForm.InquirerJobPositionId)),
                                                         new EmployeeId(inquiryForm.InquirerEmployeeNo, new PeriodId(inquiryForm.PeriodId)),
                                                         new JobPositionId(new PeriodId(inquiryForm.PeriodId),
                                                                           new SharedJobPositionId(inquiryForm.JobPositionId)),
                                                         new EmployeeId(inquiryForm.InquirySubjectEmployeeNo, new PeriodId(inquiryForm.PeriodId))),
                                                     new AbstractJobIndexId(j.JobIndexId), j.IndexValue)));

            return(inquiryForm);
        }
Example #4
0
        public InquiryFormDTO GetInquiryForm(long periodId, long inquirerJobPositionId, string inquirerEmployeeNo, string inquirySubjectEmployeeNo,
                                             long jobPositionId)
        {
            List <InquiryJobIndexPoint> inquryJobIndexPoints =
                inquiryService.GetAllInquiryJobIndexPointBy(new JobPositionInquiryConfigurationItemId(
                                                                new JobPositionId(new PeriodId(periodId), new SharedJobPositionId(inquirerJobPositionId)),
                                                                new EmployeeId(inquirerEmployeeNo, new PeriodId(periodId)),
                                                                new JobPositionId(new PeriodId(periodId), new SharedJobPositionId(jobPositionId)),
                                                                new EmployeeId(inquirySubjectEmployeeNo, new PeriodId(periodId))));

            // TODO:(LOW)Mapper and Domain Report Needed
            var inquiryForm = new InquiryFormDTO
            {
                InquirerEmployeeNo    = inquirerEmployeeNo,
                InquirerJobPositionId = inquirerJobPositionId,
                JobPositionId         = jobPositionId,

                PeriodId = periodId,
                InquirySubjectEmployeeNo = inquirySubjectEmployeeNo,
            };
            var inquiryJobIndexValueList = new List <JobIndexValueDTO>();

            foreach (var inquiryJobIndexPoint in inquryJobIndexPoints)
            {
                var abstractJobIndex = jobIndexRep.GetById(inquiryJobIndexPoint.JobIndexId);
                var jobIndex         = abstractJobIndex as JobIndex;
                if (jobIndex != null && jobIndex.IsInquireable)
                {
                    inquiryJobIndexValueList.Add(new JobIndexValueDTO
                    {
                        Id           = inquiryJobIndexPoint.Id.Id,
                        IndexValue   = inquiryJobIndexPoint.JobIndexValue,
                        JobIndexId   = inquiryJobIndexPoint.JobIndexId.Id,
                        JobIndexName = (jobIndex).Name
                    });
                }
            }

            inquiryForm.JobIndexValueList = inquiryJobIndexValueList;

            return(inquiryForm);
        }
Example #5
0
        public void UpdateInquirySubjectForm(Action <InquiryFormDTO, Exception> action, InquiryFormDTO inquiryForm)
        {
            var url =
                string.Format(baseAddress +
                              makeInquirySubjectJobIndexPointApiAdress(inquiryForm.PeriodId, inquiryForm.InquirerEmployeeNo,
                                                                       inquiryForm.InquirySubjectEmployeeNo, inquiryForm.JobPositionId) + "?Batch=1");

            WebClientHelper.Put(new Uri(url, PMSClientConfig.UriKind), action, inquiryForm, PMSClientConfig.MsgFormat, PMSClientConfig.CreateHeaderDic(userProvider.Token));
        }
Example #6
0
 public InquiryFormDTO PutInquirySubjectForm(InquiryFormDTO inquiryForm, string batch)
 {
     return(inquiryService.UpdateInquirySubjectForm(inquiryForm));
 }