public void UpdateAchievement()
        {
            var achievementName = "UpdateExistingAchievement";

            var newAchievement = Helpers.CreateAchievement(achievementName);

            var foundAchievement = _evaluationController.Get(newAchievement.Token, newAchievement.GameId, EvaluationType.Achievement);

            Assert.NotNull(foundAchievement);
            Assert.NotEqual(newAchievement.Name + "Updated", foundAchievement.Name);

            foundAchievement.Name = newAchievement.Name + "Updated";

            _evaluationController.Update(foundAchievement);

            var updatedAchievement = _evaluationController.Get(newAchievement.Token, newAchievement.GameId, EvaluationType.Achievement);

            Assert.NotEqual(achievementName, updatedAchievement.Name);
            Assert.Equal(foundAchievement.Name, updatedAchievement.Name);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void InsertEvaluationByGroup(object sender, DirectEventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(hdfGroupFilter.Text))
                {
                    var criterionModels = CriterionController.GetAll(null, Convert.ToInt32(hdfGroupFilter.Text), false,
                                                                     KpiStatus.Active, null, null, null);
                    //create new all employee
                    var records = RecordController.GetAll(null, null, DepartmentIds, RecordType.Default, null, null);
                    foreach (var criterion in criterionModels)
                    {
                        foreach (var item in records)
                        {
                            var model = new EvaluationModel()
                            {
                                RecordId    = item.Id,
                                CriterionId = criterion.Id,
                                Month       = DateTime.Now.Month,
                                Year        = DateTime.Now.Year,
                                Value       = ""
                            };

                            //get value
                            GetValueCriterionWorkbook(model, criterion, Convert.ToInt32(hdfGroupFilter.Text));

                            //check exist
                            var evaluation = EvaluationController.CheckExist(model.RecordId, model.CriterionId, model.Month, model.Year);
                            if (evaluation != null)
                            {
                                model.Id = evaluation.Id;
                                //update
                                EvaluationController.Update(model);
                            }
                            else
                            {
                                //create
                                EvaluationController.Create(model);
                            }
                        }
                    }
                    //hide window
                    wdEvaluation.Hide();
                    // reload grid
                    gpEvaluation.Reload();
                }
            }
            catch (Exception exception)
            {
                Dialog.ShowError(exception);
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void EvaluationClick(object sender, DirectEventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(hdfId.Text))
                {
                    //create new all employee
                    var records   = RecordController.GetAll(null, null, DepartmentIds, RecordType.Default, null, null);
                    var criterion = CriterionController.GetById(Convert.ToInt32(hdfId.Text));

                    foreach (var item in records)
                    {
                        var model = new EvaluationModel()
                        {
                            RecordId    = item.Id,
                            CriterionId = Convert.ToInt32(hdfId.Text),
                            Month       = DateTime.Now.Month,
                            Year        = DateTime.Now.Year,
                            Value       = ""
                        };

                        //get value
                        GetValueCriterionWorkbook(model, criterion, null);

                        //check exist
                        var evaluation = EvaluationController.CheckExist(model.RecordId, model.CriterionId, model.Month, model.Year);
                        if (evaluation != null)
                        {
                            model.Id = evaluation.Id;
                            //update
                            EvaluationController.Update(model);
                        }
                        else
                        {
                            //create
                            EvaluationController.Create(model);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Dialog.ShowError(exception);
            }
        }