示例#1
0
 public dtoEvaluation(
     lm.Comol.Modules.CallForPapers.Domain.Evaluation.Export.expEvaluation evaluation,
     DssCallEvaluation dssEvaluation,
     String anonymousDisplayName,
     String unknownUserName,
     List <dtoCriterion> criteria)
     : this(evaluation, dssEvaluation, anonymousDisplayName, unknownUserName)
 {
     if (criteria != null)
     {
         Criteria = criteria.Select(c => new dtoCriterionEvaluated(c)).ToList();
     }
 }
        //public dtoEvaluationSummaryItem(UserSubmission s, String anonymousUser)
        //    : base(s,anonymousUser )
        //{
        //     Evaluations= new List<dtoEvaluationDisplayItem> ();
        //    Counters = new Dictionary<EvaluationStatus, long>() { { EvaluationStatus.Evaluated, 0 }, { EvaluationStatus.Evaluating, 0 }, { EvaluationStatus.EvaluatorReplacement, 0 }, { EvaluationStatus.Invalidated, 0 }, { EvaluationStatus.None, 0 } };
        //}

        public dtoEvaluationSummaryItem(dtoBaseSummaryItem item, List<expEvaluation> evaluations,DssCallEvaluation dssEvaluation)
            : this()
        {
            Anonymous = item.Anonymous;
            DisplayName = item.DisplayName;
            SubmittedOn = item.SubmittedOn;
            SubmitterType = item.SubmitterType;
            IdSubmission = item.IdSubmission;
            IdSubmissionOwner = item.IdSubmissionOwner;
            IdRevision = item.IdRevision;
            IdSubmitterType = item.IdSubmitterType;
            if (evaluations!=null && evaluations.Any())
                Evaluations = evaluations.Select(e=> dtoEvaluationDisplayItem.GetAsEvaluationsSummaryItem(e)).ToList();
            DssEvaluation = dssEvaluation;
        }
示例#3
0
 //public dtoEvaluation(Evaluation evaluation) :base(evaluation)
 //{
 //    ModifiedOn = evaluation.ModifiedOn;
 //    EvaluationStartedOn = evaluation.EvaluationStartedOn;
 //    EvaluatedOn = evaluation.EvaluatedOn;
 //    AverageRating= evaluation.AverageRating;
 //    SumRating= evaluation.SumRating;
 //    Comment = evaluation.Comment;
 //    Criteria = new List<dtoCriterionEvaluated>();
 //    SubmitterType = (evaluation.Submission != null) ? evaluation.Submission.Type.Name : "";
 //}
 public dtoEvaluation(lm.Comol.Modules.CallForPapers.Domain.Evaluation.Export.expEvaluation evaluation, DssCallEvaluation dssEvaluation, String anonymousDisplayName, String unknownUserName)
     : base(evaluation, anonymousDisplayName, unknownUserName)
 {
     ModifiedOn          = evaluation.LastUpdateOn;
     EvaluationStartedOn = evaluation.EvaluationStartedOn;
     EvaluatedOn         = evaluation.EvaluatedOn;
     AverageRating       = evaluation.AverageRating;
     SumRating           = evaluation.SumRating;
     DssRating           = new dtoDssRating()
     {
         IsValid = false
     };
     DssRating.IsValid     = evaluation.UseDss && (dssEvaluation != null && dssEvaluation.IsValid);
     DssRating.IsCompleted = evaluation.UseDss && (dssEvaluation != null && dssEvaluation.IsCompleted);
     DssRating.Ranking     = evaluation.DssRanking;
     DssRating.Value       = evaluation.DssValue;
     DssRating.ValueFuzzy  = evaluation.DssValueFuzzy;
     DssRating.IsFuzzy     = evaluation.DssIsFuzzy;
     Comment       = evaluation.Comment;
     Criteria      = new List <dtoCriterionEvaluated>();
     SubmitterType = (evaluation.Submission != null) ? evaluation.Submission.Type.Name : "";
 }
 public dtoSubmissionCommitteeItem(long idCommittee,String name, long idSubmission, DssCallEvaluation dssEvaluation)
 {
     Evaluators = new List<dtoEvaluatorDisplayItem>();
     Criteria = new List<dtoCriterionSummaryItem>();
     IdCommittee = idCommittee;
     Name = name;
     IdSubmission = idSubmission;
     DssEvaluation = dssEvaluation;
 }
 public static dtoCommitteeEvaluatorEvaluationDisplayItem GetForEvaluationsDisplay(expEvaluation evaluation, DssCallEvaluation dssEvaluation,String unknownUser)
 {
     dtoCommitteeEvaluatorEvaluationDisplayItem item = new dtoCommitteeEvaluatorEvaluationDisplayItem();
     item.Id = evaluation.Id;
     item.ModifiedOn = evaluation.LastUpdateOn;
     item.EvaluationStartedOn = evaluation.EvaluationStartedOn;
     item.EvaluatedOn = evaluation.EvaluatedOn;
     item.AverageRating = evaluation.AverageRating;
     item.SumRating = evaluation.SumRating;
     item.Status = evaluation.Status;
     item.Evaluated = evaluation.Evaluated;
     item.IdCommittee = (evaluation.Committee != null) ? evaluation.Committee.Id : 0;
     item.IdEvaluator = (evaluation.Evaluator != null) ? evaluation.Evaluator.Id : 0;
     item.EvaluatorName = (evaluation.Evaluator != null && evaluation.Evaluator.Person != null && evaluation.Evaluator.Person.TypeID != (int)UserTypeStandard.Guest) ? evaluation.Evaluator.Person.SurnameAndName : unknownUser;
     item.Comment = evaluation.Comment;
     item.DssRanking = evaluation.DssRanking;
     item.DssEvaluation = dssEvaluation;
     return item;
 }