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; } }
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; } }