Exemplo n.º 1
0
 public CriterionGroupModel()
 {
     // set model default props
     Init(new kpi_CriterionGroup());
     _criterion = new kpi_Criterion();
     _group     = new kpi_Group();
 }
Exemplo n.º 2
0
 public EvaluationModel()
 {
     // set model default props
     Init(new kpi_Evaluation());
     _criterion = new kpi_Criterion();
     _record    = new hr_Record();
 }
Exemplo n.º 3
0
        /// <summary>
        /// Update
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CriterionModel Update(CriterionModel model)
        {
            // int entity
            var entity = new kpi_Criterion();

            // fill entity
            model.FillEntity(ref entity);

            // update
            return(new CriterionModel(kpi_CriterionServices.Update(entity)));
        }
Exemplo n.º 4
0
        public CriterionGroupModel(kpi_CriterionGroup criterionGroup)
        {
            // init entity
            criterionGroup = criterionGroup ?? new kpi_CriterionGroup();

            // set model props
            Init(criterionGroup);
            _criterion = kpi_CriterionServices.GetById(criterionGroup.CriterionId);
            _criterion = _criterion ?? new kpi_Criterion();
            _group     = kpi_GroupServices.GetById(criterionGroup.GroupId);
            _group     = _group ?? new kpi_Group();
        }
Exemplo n.º 5
0
        public EvaluationModel(kpi_Evaluation evaluation)
        {
            // init entity
            evaluation = evaluation ?? new kpi_Evaluation();

            // set model props
            Init(evaluation);

            _criterion = kpi_CriterionServices.GetById(evaluation.CriterionId);
            _criterion = _criterion ?? new kpi_Criterion();
            _record    = hr_RecordServices.GetById(evaluation.RecordId);
            _record    = _record ?? new hr_Record();
        }