Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CandidateModel Create(CandidateModel model)
        {
            var entity = new rec_Candidate();

            model.FillEntity(ref entity);
            return(new CandidateModel(rec_CandidateServices.Create(entity)));
        }
Example #2
0
 public CandidateInterviewModel()
 {
     _candidateInterview = new rec_CandidateInterview();
     _interview          = new rec_Interview();
     _record             = new hr_Record();
     _candidate          = new rec_Candidate();
     // set model default props
     Init(_candidateInterview);
 }
Example #3
0
        public CandidateInterviewModel(rec_CandidateInterview interview)
        {
            // init entity
            _candidateInterview = interview ?? new rec_CandidateInterview();

            // set model props
            Init(_candidateInterview);

            //get data relation
            _interview = rec_InterviewServices.GetById(_candidateInterview.InterviewId);
            _interview = _interview ?? new rec_Interview();
            _record    = hr_RecordServices.GetById(_candidateInterview.RecordId) ?? new hr_Record();
            _candidate =
                rec_CandidateServices.GetByCondition("[RecordId] = {0}".FormatWith(_candidateInterview.RecordId));
            _candidate = _candidate ?? new rec_Candidate();
        }