Ejemplo n.º 1
0
        public void AddParts(BasePartsUI basePartsUI)
        {
            BaseParts BaseParts = null;

            if (basePartsUI is EngineUI)
            {
                BaseParts = ConvertToEngine(basePartsUI as EngineUI);
            }
            else if (basePartsUI is GearboxUI)
            {
                BaseParts = ConvertTOGearbox(basePartsUI as GearboxUI);
            }
            else if (basePartsUI is InteriorUI)
            {
                BaseParts = ConvertTOInterior(basePartsUI as InteriorUI);
            }
            else if (basePartsUI is ExteriorUI)
            {
                BaseParts = ConvertTOExterior(basePartsUI as ExteriorUI);
            }
            _WCF.AddParts(BaseParts);
        }
Ejemplo n.º 2
0
        public BasePartsUI ConvertoToBasePartsUI(BaseParts baseParts)
        {
            BasePartsUI basePartsUI = null;

            if (baseParts is Engine)
            {
                basePartsUI = ConvertToEngineUI(baseParts as Engine);
            }
            else if (baseParts is Gearbox)
            {
                basePartsUI = ConvertToGearBoxUI(baseParts as Gearbox);
            }
            else if (baseParts is Interior)
            {
                basePartsUI = ConvertToInteriorUI(baseParts as Interior);
            }
            else if (baseParts is Exterior)
            {
                basePartsUI = ConvertToExteriorUI(baseParts as Exterior);
            }
            return(basePartsUI);
        }