Пример #1
0
        private void OduTypeNextClick()
        {
            if (Project.isSystemPropertyWiz)
            {
                OduNextToClick();
            }
            else
            {
                ODUErrorMessage = null;
                string errorMessage = string.Empty;
                if (OutDoorInfoProjectLegacyValidation(out errorMessage))
                {
                    JCHVRF.Model.NextGen.SystemVRF newSystem = (JCHVRF.Model.NextGen.SystemVRF)WorkFlowContext.NewSystem;
                    newSystem.MaxRatio = Convert.ToDouble(Convert.ToDecimal(SelectedMaxRatio) / 100);
                    newSystem.Power    = ListPower.FirstOrDefault().SelectedValues;

                    if (newSystem.Power != null)
                    {
                        newSystem.SelOutdoorType = listType.FirstOrDefault();
                    }
                    //newSystem.ProductType = ListType.FirstOrDefault();
                    newSystem.ProductCategory = SelectedProductCategory;
                    newSystem.ProductSeries   = SelProductSeries.DisplayName;
                    newSystem.Series          = SelectedSeries;
                    newSystem.ProductType     = ProductType;
                    newSystem.OutdoorItem     = new Outdoor
                    {
                        ProductType = ProductType,
                        Series      = SelectedSeries,
                        MaxRatio    = SelectedMaxRatio,
                        TypeImage   = OduImagePath
                    };
                    if (!String.IsNullOrEmpty(OduImagePath))
                    {
                        newSystem.DisplayImageName = OduImagePath;
                    }

                    _eventAggregator.GetEvent <OduTabSubscriber>().Publish(true);
                }
                else
                {
                    ODUErrorMessage = errorMessage;
                    // JCHMessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                    _eventAggregator.GetEvent <OduTabSubscriber>().Publish(false);
                }
            }
        }
Пример #2
0
        private void OduNextToClick()
        {
            if (!string.IsNullOrEmpty(JCHVRF.Model.Project.CurrentSystemId))
            {
                JCHVRF.Model.NextGen.SystemVRF _currentSystem = JCHVRF.Model.Project.CurrentProject.SystemListNextGen.FirstOrDefault(x => ((SystemBase)x).Id.Equals(JCHVRF.Model.Project.CurrentSystemId));
                //_currentSystem.MyPipingNodeOut = null;

                var proj = JCHVRF.Model.Project.CurrentProject;

                JCHVRF.Model.NextGen.SystemVRF selectedSys = _currentSystem.DeepCopy();
                if (proj.RoomIndoorList != null && proj.RoomIndoorList.Count > 0)
                {
                    selectedSys.OutdoorItem = new Outdoor
                    {
                        ProductType = ProductType,
                        Series      = SelectedSeries,
                        MaxRatio    = Convert.ToDouble(Convert.ToDecimal(SelectedMaxRatio) / 100),
                        TypeImage   = OduImagePath,
                        Type        = ListType.FirstOrDefault(),
                    };

                    selectedSys.ProductCategory = SelectedProductCategory;
                    selectedSys.ProductSeries   = SelProductSeries.DisplayName;
                    selectedSys.ProductType     = ProductType;
                    selectedSys.MaxRatio        = Convert.ToDouble(Convert.ToDecimal(SelectedMaxRatio) / 100);
                    selectedSys.SelOutdoorType  = ListType.FirstOrDefault();
                    selectedSys.Power           = ListPower.FirstOrDefault().SelectedValues;
                    selectedSys.Series          = SelectedSeries;


                    //selectedSys.Name = _currentSystem.Name;
                    //selectedSys.Id = JCHVRF.Model.Project.CurrentSystemId;
                    //ReSelectOutDoor:: Check If Valid System
                    selectedSys.IsInputLengthManually = false;
                    selectedSys.MyPipingNodeOut       = null;
                    selectedSys.MyPipingNodeOutTemp   = null;
                    selectedSys.IsOutDoorUpdated      = false;
                    var IsValid = ReselectOutdoor(selectedSys);
                    if (IsValid == false)
                    {
                        _currentSystem.IsOutDoorUpdated = false;
                    }
                }
            }
        }