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;
        }
        //================================================================================
        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();
 }
 public void EditOffhireDetail(OffhireDto offhireDto, OffhireDetailDto offhireDetailDto)
 {
     var view = this.ViewManager.ShowInDialog<IOffhireDetailView>();
     (view.ViewModel as OffhireDetailVM).Edit(offhireDto, offhireDetailDto);
 }
        //================================================================================
        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);
                }
            });
        }
        //================================================================================
        private void initialize(OffhireDto offhire, OffhireDetailDto offhireDetailDto)
        {
            this.Offhire = offhire;

            this.Entity = offhireDetailDto;

            //loadGoods();

            //loadCurrencies();
        }
 //================================================================================
 public void Edit(OffhireDto offhire, OffhireDetailDto offhireDetailDto)
 {
     this.IsInEditMode = true;
     initialize(offhire, offhireDetailDto);
 }