コード例 #1
0
        public int Add(PromotionsRecordsQualificationsPointsBLL PromotionRecordQualificationPoint)
        {
            try
            {
                PromotionsRecordsQualificationsPoints PromotionRecordQualificationPointObj = new PromotionsRecordsQualificationsPoints();
                PromotionRecordQualificationPointObj.PromotionRecordID       = PromotionRecordQualificationPoint.PromotionRecord.PromotionRecordID;
                PromotionRecordQualificationPointObj.QualificationDegreeID   = PromotionRecordQualificationPoint.QualificationDegree.QualificationDegreeID;
                PromotionRecordQualificationPointObj.QualificationID         = PromotionRecordQualificationPoint.Qualification != null ? PromotionRecordQualificationPoint.Qualification.QualificationID : (int?)null;
                PromotionRecordQualificationPointObj.GeneralSpecializationID = PromotionRecordQualificationPoint.GeneralSpecialization != null ? PromotionRecordQualificationPoint.GeneralSpecialization.GeneralSpecializationID : (int?)null;
                PromotionRecordQualificationPointObj.Points      = 0;
                PromotionRecordQualificationPointObj.CreatedBy   = PromotionRecordQualificationPoint.LoginIdentity.EmployeeCodeID;
                PromotionRecordQualificationPointObj.CreatedDate = DateTime.Now;

                return(new PromotionsRecordsQualificationsPointsDAL().Insert(PromotionRecordQualificationPointObj));
                //return new Result
            }
            catch
            {
                throw;
            }
        }
コード例 #2
0
 internal PromotionsRecordsQualificationsPointsBLL MapPromotionRecordQualificationPoint(PromotionsRecordsQualificationsPoints PromotionRecordEmployee)
 {
     try
     {
         PromotionsRecordsQualificationsPointsBLL PromotionRecordQualificationPoint = null;
         if (PromotionRecordEmployee != null)
         {
             PromotionRecordQualificationPoint = new PromotionsRecordsQualificationsPointsBLL();
             PromotionRecordQualificationPoint.PromotionRecordQualificationPointID = PromotionRecordEmployee.PromotionRecordQualificationPointID;
             PromotionRecordQualificationPoint.PromotionRecord       = new PromotionsRecordsBLL().MapPromotionRecord(PromotionRecordEmployee.PromotionsRecords);
             PromotionRecordQualificationPoint.QualificationDegree   = new QualificationsDegreesBLL().MapQualificationDegree(PromotionRecordEmployee.QualificationsDegrees);
             PromotionRecordQualificationPoint.Qualification         = new QualificationsBLL().MapQualification(PromotionRecordEmployee.Qualifications);
             PromotionRecordQualificationPoint.GeneralSpecialization = new GeneralSpecializationsBLL().MapGeneralSpecialization(PromotionRecordEmployee.GeneralSpecializations);
             //PromotionRecordQualificationPoint.Points = PromotionRecordEmployee.Points.HasValue ? Math.Round(PromotionRecordEmployee.Points.Value, 2) : PromotionRecordEmployee.Points;
             PromotionRecordQualificationPoint.Points = PromotionRecordEmployee.Points;
             PromotionRecordQualificationPoint.PromotionRecordQualificationKind = new PromotionsRecordsQualificationsKindsBLL().MapPromotionRecordQualificationKind(PromotionRecordEmployee.PromotionsRecordsQualificationsKinds);
         }
         return(PromotionRecordQualificationPoint);
     }
     catch
     {
         throw;
     }
 }