コード例 #1
0
        private void InitializeViews(int?performanceEvaluation_id)
        {
            PerformanceEvaluation performanceEvaluation;

            if (performanceEvaluation_id != null)
            {
                performanceEvaluation = _performanceEvaluationService.GetById((int)performanceEvaluation_id);
            }
            else
            {
                performanceEvaluation = new PerformanceEvaluation();
            }
            _performanceEvaluationViewModel = new PerformanceEvaluationViewModel(performanceEvaluation);
        }
コード例 #2
0
        private static void UpdatePerformanceEvaluation(this List <PerformanceEvaluationViewModel> viewmodel, ClientFieldData[] formData, string table)
        {
            viewmodel.Clear();

            var itemsTable = formData.Where(x => x.Name.Contains("answer-"));

            foreach (var item in itemsTable)
            {
                var model = new PerformanceEvaluationViewModel();

                model.Score = item.ConvertToInt(mode: ConvertModeEnum.ThrowExceptionInFail);
                model.Id    = int.Parse(item.Id);

                viewmodel.Add(model);
            }
        }