public static void Db2O(EFData.ControlSpace dbObj, ControlSpace obj) { obj.Id = dbObj.Id; obj.Name = dbObj.Name; obj.IsActive = dbObj.IsActive; obj.Prefix = dbObj.Prefix; }
public LightElement(PointTypeEnum pointType, ControlSpace space) : this() { ControlSpace = space; PointType = pointType; if (pointType == PointTypeEnum.RGB && space.Id == 1) { ColorSequenceList = LightElement.ColorSequenseRGB; ColorSequence = ColorSequenceList[0]; } if (pointType == PointTypeEnum.RGBW && space.Id == 1) { ColorSequenceList = LightElement.ColorSequenseRGBW; ColorSequence = ColorSequenceList[0]; } Name = string.Format($"{ControlSpace.Prefix}_{pointType}_"); }
public LightElement(PointTypeEnum pointType, ControlSpace space) : this() { ControlSpace = space; PointType = pointType; if (space.Prefix == "AN" || space.Prefix == "DX") { if (pointType == PointTypeEnum.RGB) { ColorSequence = "RGB"; } if (pointType == PointTypeEnum.RGBW) { ColorSequence = "RGBW"; } } Name = string.Format($"{ControlSpace.Prefix}_{pointType}_"); }
/****************************************************************/ #region ControlSpace public static void O2Db(ControlSpace obj, EFData.ControlSpace dbObj) { //dbObj.Id = obj.Id; dbObj.Name = obj.Name; dbObj.IsActive = obj.IsActive; }