public CriterionGroupModel() { // set model default props Init(new kpi_CriterionGroup()); _criterion = new kpi_Criterion(); _group = new kpi_Group(); }
public EvaluationModel() { // set model default props Init(new kpi_Evaluation()); _criterion = new kpi_Criterion(); _record = new hr_Record(); }
/// <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))); }
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(); }
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(); }