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

            this.Entity = offhireDetailDto;

            //loadGoods();

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