Ejemplo n.º 1
0
        public MilestoneEntity ConvertToEntity(MilestoneModel entity)
        {
            if (entity == null)
                return null;

            var model = new MilestoneEntity(entity.Id);
            model.DeadLine = entity.DeadLine;
            model.EndTime = entity.EndTime;
            model.MaxCost = entity.MaxCost;
            model.Name = entity.Name;
            model.Description = entity.Description;
            model.PercentageComplete = entity.PercentageComplete;
            model.PlannedEndTime = entity.PlannedEndTime;
            model.StartTime = entity.StartTime;
            return model;
        }
Ejemplo n.º 2
0
        public async Task<MilestoneModel> ConvertToModel(MilestoneEntity entity)
        {
            if (entity == null)
                return null;

            var model = new MilestoneModel(entity.Id);
            model.Description = entity.Description;
            model.DeadLine = entity.DeadLine;
            model.EndTime = entity.EndTime;
            model.MaxCost = entity.MaxCost;
            model.Name = entity.Name;
            model.PercentageComplete = entity.PercentageComplete;
            model.PlannedEndTime = entity.PlannedEndTime;
            model.StartTime = entity.StartTime;

            model.Procedures = await ProcedureRepository.Instance.GetProcedureByMilestoneId(entity.Id);

            return model;
        }