예제 #1
0
        private bool ValidateHeatWetBulb()
        {
            double nCWBVal = Math.Round((Convert.ToDouble(HeatingWetBulb))); //Convert.ToDouble(indoorCoolingWB);

            if ((nCWBVal >= -20) && (nCWBVal <= 15))
            {
                lblOutDoorHeatingWB = string.Empty;
                if (Convert.ToDecimal(HeatingWetBulb) > Convert.ToDecimal(HeatingDryBulb))
                {
                    JCHMessageBox.ShowWarning(Msg.WARNING_TXT_LESSTHAN(UnitTemperature.WB.ToString(), UnitTemperature.DB.ToString()));
                    return(false);
                }

                return(true);
            }
            else
            {
                lblOutDoorHeatingWB = string.Format("Range[{0}, {1}]", Unit.ConvertToControl(-20, UnitType.TEMPERATURE, CurrentTempUnit), Unit.ConvertToControl(15, UnitType.TEMPERATURE, CurrentTempUnit)); //"Range[14, 24]";

                if (Convert.ToDecimal(HeatingWetBulb) > Convert.ToDecimal(HeatingDryBulb))
                {
                    JCHMessageBox.ShowWarning(Msg.WARNING_TXT_LESSTHAN(UnitTemperature.WB.ToString(), UnitTemperature.DB.ToString()));
                }
                return(false);
            }
        }
예제 #2
0
        private bool ValidateHeatingDryBulb()
        {
            double nCDBVal = Math.Round(Convert.ToDouble(HeatingDryBulb));

            if ((nCDBVal >= -18) && (nCDBVal <= 33))
            {
                lblOutdoorheatingDB = string.Empty;
                return(true);
            }
            else
            {
                lblOutdoorheatingDB = string.Format("Range[{0}, {1}]", Unit.ConvertToControl(-18, UnitType.TEMPERATURE, CurrentTempUnit), Unit.ConvertToControl(33, UnitType.TEMPERATURE, CurrentTempUnit));

                if (Convert.ToDecimal(HeatingDryBulb) < Convert.ToDecimal(HeatingWetBulb) && !(HeatingDryBulb == 0))
                {
                    JCHMessageBox.ShowWarning(Msg.WARNING_TXT_LESSTHAN(UnitTemperature.WB.ToString(), UnitTemperature.DB.ToString()));
                }

                return(false);
            }
        }
예제 #3
0
 private void OpenProjectClicked()
 {
     try
     {
         int projectId = JCHVRF.BLL.CommonBLL.ImportVRFProject("VRF");
         if (projectId <= 0)
         {
             JCHMessageBox.ShowWarning(Msg.IMPORT_PROJECT_FAILED);
             return;
         }
         else
         {
             openVRFProject(projectId);
             JCHMessageBox.Show(string.Format(language.Current.GetMessage("ALERT_PROJECT_OPEN_SUCCESS")));
         }
     }
     catch (Exception ex)
     {
         int?id = Project.GetProjectInstance?.projectID;
         Logger.LogProjectError(id, ex);
     }
 }
예제 #4
0
        /// <summary>
        /// Type1 Compatibilty check between Controllers and Selected Systems
        /// </summary>
        /// <param name="valid"></param>
        /// <returns></returns>
        private bool CheckForSystems(bool valid)
        {
            string productType        = string.Empty;
            var    controlProductType = productTypeBll.GetControllerProductTypeData(Project.CurrentProject.SubRegionCode,
                                                                                    Project.CurrentProject.BrandCode, TempControllerList);

            if (SelectedSystems.Count > 0)
            {
                foreach (var sys in SelectedSystems)
                {
                    if (sys.System.GetType().Equals(typeof(NextGenModel.SystemVRF)))
                    {
                        productType = ((NextGenModel.SystemVRF)sys.System).OutdoorItem.ProductType;
                    }
                    else
                    {
                        productType = ((RoomIndoor)sys.System).IndoorItem.ProductType;
                    }

                    if (controlProductType != null)
                    {
                        if (!controlProductType.Contains(productType))
                        {
                            JCHMessageBox.Show(Msg.ERR_CONTROLLER_PRODUCTTYPE_COMPATIBILITY(sys.SystemName), MessageType.Warning);
                            valid = false;
                            break;
                        }
                    }
                }
            }
            else
            {
                JCHMessageBox.ShowWarning("No Systems available");
            }
            //appropriate message to add systems
            return(valid);
        }