示例#1
0
文件: Mbo.cs 项目: leexar/diploma
        public virtual void Update(MboRev newRevision)
        {
            var currentRevision = ActiveRevision;

            currentRevision?.Deactivate();

            MboRevs.Add(newRevision);
        }
示例#2
0
        public static MboKpi Create(MboRev mboRev, Kpi kpi)
        {
            var entity = new MboKpi()
            {
                Revision = mboRev, Kpi = kpi
            };

            return(entity);
        }
示例#3
0
        public static MboActuals Create(MboRev mboRev, Kpi kpi, MonthlyValuesValueObject values)
        {
            var entity = new MboActuals()
            {
                MboRev = mboRev, Kpi = kpi, Values = values
            };

            return(entity);
        }
示例#4
0
文件: MboRev.cs 项目: leexar/diploma
        public static MboRev Create(Mbo mbo, IList <Kpi> kpis, IDictionary <Kpi, MonthlyValuesValueObject> actuals, User userCreator)
        {
            var entity = new MboRev(userCreator)
            {
                Mbo = mbo
            };

            entity.Kpis    = kpis.Select(kpi => MboKpi.Create(entity, kpi)).ToList();
            entity.Actuals = actuals.Select(actuals => MboActuals.Create(entity, actuals.Key, actuals.Value)).ToList();

            return(entity);
        }