public OffhireDetailDto MapToModel(OffhirePreparedDataDetail entity)
        {
            var result = new OffhireDetailDto()
                         {
                             Id= -1,
                             Good = goodDtoMapper.MapToModel(entity.Good),
                             Quantity = entity.Quantity,
                             Unit = goodUnitDtoMapper.MapToModel(entity.Unit),
                             FeeInMainCurrency = entity.FeeInMainCurrency,
                             Tank = entity.Tank != null ? tankDtoMapper.MapToModel(entity.Tank) : null
                         };

            return result;
        }
Пример #2
0
        //================================================================================
        public void AddOffhireDetail(Action<OffhireDetailDto, Exception> action, OffhireDetailDto detailDto)
        {
            var url = string.Format(this.offhireDetailAddressFormatString, string.Empty);

            WebClientHelper.Post(ApiServiceAddressHelper.BuildUri(url), action, detailDto, WebClientHelper.MessageFormat.Json,ApiConfig.Headers);
        }
 public OffhireDetailDto RemapModel(OffhireDetailDto model)
 {
     throw new System.NotImplementedException();
 }
 public OffhirePreparedDataDetail MapToEntity(OffhireDetailDto model)
 {
     throw new System.NotImplementedException();
 }
Пример #5
0
 public void EditOffhireDetail(OffhireDto offhireDto, OffhireDetailDto offhireDetailDto)
 {
     var view = this.ViewManager.ShowInDialog<IOffhireDetailView>();
     (view.ViewModel as OffhireDetailVM).Edit(offhireDto, offhireDetailDto);
 }
Пример #6
0
        //================================================================================
        private void submitActionCallback(OffhireDetailDto result, Exception exception)
        {
            this.fuelMainController.BeginInvokeOnDispatcher(() =>
            {
                this.HideBusyIndicator();

                if (exception == null)
                {
                    this.fuelMainController.Publish(new OffhireDetailListChangedArg());

                    this.fuelMainController.ShowMessage(SUCCESSFUL_OPERATION_MESSAGE);

                    this.fuelMainController.Close(this);
                }
                else
                {
                    this.fuelMainController.HandleException(exception);
                }
            });
        }
Пример #7
0
        //================================================================================
        private void initialize(OffhireDto offhire, OffhireDetailDto offhireDetailDto)
        {
            this.Offhire = offhire;

            this.Entity = offhireDetailDto;

            //loadGoods();

            //loadCurrencies();
        }
Пример #8
0
 //================================================================================
 public void Edit(OffhireDto offhire, OffhireDetailDto offhireDetailDto)
 {
     this.IsInEditMode = true;
     initialize(offhire, offhireDetailDto);
 }