コード例 #1
0
        public virtual Result Update()
        {
            try
            {
                Result result = null;

                EmployeesEvaluations EmployeeEvaluation = new EmployeesEvaluations()
                {
                    EmployeeEvaluationID = this.EmployeeEvaluationID,
                    EmployeeCodeID       = this.EmployeeCode.EmployeeCodeID,
                    MaturityYearID       = this.MaturityYearsBalances.MaturityYearID,
                    EvaluationPointID    = this.EvaluationPoints.EvaluationPointID,
                    EvaluationDegree     = this.EvaluationDegree,
                    LastUpdatedDate      = DateTime.Now,
                    LastUpdatedBy        = this.LoginIdentity.EmployeeCodeID
                };
                this.EmployeeEvaluationID = new EmployeesEvaluationsDAL().Update(EmployeeEvaluation);
                result = new Result()
                {
                    Entity     = this,
                    EnumType   = typeof(EmployeesEvaluationsValidationEnum),
                    EnumMember = EmployeesEvaluationsValidationEnum.Done.ToString(),
                };
                return(result);
            }
            catch
            {
                throw;
            }
        }
コード例 #2
0
        internal EmployeesEvaluationsBLL MapEmployeeEvaluation(EmployeesEvaluations EmployeeEvaluation)
        {
            try
            {
                EmployeesEvaluationsBLL EmployeeEvaluationBLL = null;
                if (EmployeeEvaluation != null)
                {
                    EmployeeEvaluationBLL = new EmployeesEvaluationsBLL()
                    {
                        EmployeeEvaluationID  = EmployeeEvaluation.EmployeeEvaluationID,
                        MaturityYearsBalances = new MaturityYearsBalancesBLL().MapMaturityYearBalance(EmployeeEvaluation.MaturityYearsBalances),
                        EvaluationPoints      = new EvaluationPointsBLL().MapEvaluationPoint(EmployeeEvaluation.EvaluationPoints),
                        EvaluationDegree      = (float)EmployeeEvaluation.EvaluationDegree,
                        EvaluationPointsEnum  = (EvaluationPointsEnum)EmployeeEvaluation.EvaluationPointID,
                        EmployeeCode          = new EmployeesCodesBLL().MapEmployeeCode(EmployeeEvaluation.EmployeesCodes),
                        CreatedBy             = new EmployeesCodesBLL().MapEmployeeCode(EmployeeEvaluation.CreatedByNav),
                        CreatedDate           = EmployeeEvaluation.CreatedDate.Value
                    };
                    EmployeeEvaluationBLL.EmployeeEvaluationDetails = new List <EmployeesEvaluationsDetailsBLL>();

                    foreach (var item in EmployeeEvaluation.EmployeesEvaluationsDetails)
                    {
                        EmployeeEvaluationBLL.EmployeeEvaluationDetails.Add(new EmployeesEvaluationsDetailsBLL().MapEmployeeEvaluationDetails(item));
                    }
                }
                return(EmployeeEvaluationBLL);
            }
            catch
            {
                throw;
            }
        }