private void GasManagementDataMappingToModel(DivePlanEntityModel divePlanEntityModel)
 {
     _divePlanViewModel.GasManagement.GasRemaining               = divePlanEntityModel.GasRemaining;
     _divePlanViewModel.GasManagement.GasUsedForStep             = divePlanEntityModel.GasUsedForStep;
     _divePlanViewModel.GasManagement.InitialCylinderTotalVolume = divePlanEntityModel.InitialCylinderTotalVolume;
     _divePlanViewModel.GasManagement.SacRate = divePlanEntityModel.SacRate;
 }
        public DivePlanSetupViewModel EntityToModel(DivePlanEntityModel divePlanEntityModel)
        {
            DiveModelSelectorDataMappingToModel(divePlanEntityModel);
            DiveStepDataMappingToModel(divePlanEntityModel);
            GasManagementDataMappingToModel(divePlanEntityModel);
            GasMixtureDataMappingToModel(divePlanEntityModel);

            return(_divePlanViewModel);
        }
        private void GasMixtureDataMappingToModel(DivePlanEntityModel divePlanEntityModel)
        {
            _divePlanViewModel.GasMixture.NewGasMixture.GasName = divePlanEntityModel.NewGasMixtureGasName;
            _divePlanViewModel.GasMixture.NewGasMixture.Helium  = divePlanEntityModel.NewGasMixtureHelium;
            _divePlanViewModel.GasMixture.NewGasMixture.Oxygen  = divePlanEntityModel.NewGasMixtureOxygen;

            _divePlanViewModel.GasMixture.SelectedGasMixture.GasName = divePlanEntityModel.SelectedGasMixtureGasName;
            _divePlanViewModel.GasMixture.SelectedGasMixture.Oxygen  = divePlanEntityModel.SelectedGasMixtureOxygen;
            _divePlanViewModel.GasMixture.SelectedGasMixture.Helium  = divePlanEntityModel.SelectedGasMixtureHelium;

            for (int i = 0; i < divePlanEntityModel.GasName.Count - 1; i++)
            {
                _divePlanViewModel.GasMixture.GasMixtures[i].GasName = divePlanEntityModel.GasName[i];
                _divePlanViewModel.GasMixture.GasMixtures[i].Oxygen  = divePlanEntityModel.Oxygen[i];
                _divePlanViewModel.GasMixture.GasMixtures[i].Helium  = divePlanEntityModel.Helium[i];
            }

            _divePlanViewModel.GasMixture.MaximumOperatingDepth = divePlanEntityModel.MaximumOperatingDepth;
        }
 private void DiveModelSelectorDataMappingToModel(DivePlanEntityModel divePlanEntityModel)
 {
     _divePlanViewModel.DiveModelSelector.SelectedDiveModel = divePlanEntityModel.SelectedDiveModel;
 }
 private void DiveStepDataMappingToModel(DivePlanEntityModel divePlanEntityModel)
 {
     _divePlanViewModel.DiveStep.Depth = divePlanEntityModel.Depth;
     _divePlanViewModel.DiveStep.Time  = divePlanEntityModel.Time;
 }