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)); } }
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)); }
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); }
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); }
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)); }
public void PutPeriodState(long id, PeriodStateDTO stateDto) { periodService.ChangePeriodState(id, stateDto); }