public static HomeACModel FillACModelInfo(Aircraft ac) { HomeACModel model = new HomeACModel(); model.aircraft = ac; model.ACmodel = (Model)System.Enum.Parse(typeof(Model), ac.Model); model.ACmodelType = HomeACModel.EnumHelper <ModelType> .GetValueFromName(ac.ModelType); model.ACengineType = HomeACModel.EnumHelper <EngineType> .GetValueFromName(ac.Engine); return(model); }
// Variables only available for the Details will be implemented later on. public Aircraft FillACInfo(HomeACModel model) { Aircraft ac = new Aircraft(); ac.Id = model.aircraft.Id; ac.Registration = model.aircraft.Registration; ac.Effectivity = model.aircraft.Effectivity; ac.Model = model.ACmodel.ToString(); ac.ModelType = model.ACmodelType.DisplayName(); ac.Engine = model.ACengineType.DisplayName(); ac.BodyNo = model.aircraft.BodyNo; ac.LineNo = model.aircraft.LineNo; ac.SerialNo = model.aircraft.SerialNo; ac.DeliveryDate = model.aircraft.DeliveryDate; return(ac); }