예제 #1
0
 public void ChangePeriodState(long periodId, PeriodStateDTO stateDto)
 {
     if (stateDto.State == (int)PeriodState.InitializingForInquiry)
     {
         periodEngine.InitializeInquiry(new PeriodId(periodId));
     }
     else if (stateDto.State == (int)PeriodState.InquiryStarted)
     {
         periodService.StartInquiry(new PeriodId(periodId));
     }
     else if (stateDto.State == (int)PeriodState.InquiryCompleted)
     {
         periodService.CompleteInquiry(new PeriodId(periodId));
     }
     else if (stateDto.State == (int)PeriodState.Closed)
     {
         periodService.Close(new PeriodId(periodId));
     }
     else if (stateDto.State == (int)PeriodState.Confirmation)
     {
         periodService.StartConfirmation(new PeriodId(periodId));
     }
     else if (stateDto.State == (int)PeriodState.Confirmed)
     {
         periodService.Confirm(new PeriodId(periodId));
     }
 }
예제 #2
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));
        }
예제 #3
0
        private void save()
        {
            PeriodStateDTO state = new PeriodStateDTO()
            {
                State = (int)PeriodStateEnum.BasicDataCopying
            };

            periodService.CopyBasicDataFrom((exp) => appController.BeginInvokeOnDispatcher(() =>
            {
                HideBusyIndicator();
                if (exp == null)
                {
                    finalizeAction();
                    periodController.ShowPeriodBasicDataCopyStatusView(period);
                }
                else
                {
                    appController.HandleException(exp);
                }
            }), SelectedSourcePeriod.Id, Period.Id, state);
        }
예제 #4
0
 public void CopyBasicData(long sourcePeriodId, long destionationPeriodId, PeriodStateDTO stateDto)
 {
     periodEngine.CopyBasicData(new PeriodId(sourcePeriodId), new PeriodId(destionationPeriodId));
 }
        //public PeriodStateWithRunSummaryDTO GetPeriodState(long periodId, long Id)
        //{
        //    return periodService.GetPeriodState(Id);
        //}

        public void PutPeriodState(long sourcePeriodId, long destinationPeriodId, PeriodStateDTO stateDto)
        {
            periodService.CopyBasicData(sourcePeriodId, destinationPeriodId, stateDto);
        }
예제 #6
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));
        }
예제 #7
0
 public void PutPeriodState(long id, PeriodStateDTO stateDto)
 {
     periodService.ChangePeriodState(id, stateDto);
 }