public ApplyCvExcelViewModel(ApplyCV entity)
 {
     Ten              = entity.FullName;
     DiaChi           = entity.Address;
     NgaySinh         = entity.DateOfBirth.ToString("dd/MM/yyyy");
     SoDT             = entity.PhoneNumber;
     Email            = entity.Email;
     TrinhDoChuyenMon = entity.Qualification;
     ViTri            = entity.PositionName;
     NgayNop          = entity.DateCreated;
     TrangThai        = entity.UserReply != null ? "Đã phản hồi" : "Chưa phản hồi";
 }
 public RecruitmentCVViewModel(ApplyCV entity)
 {
     Id              = entity.Id;
     FullName        = entity.FullName;
     Slug            = entity.Slug;
     Address         = entity.Address;
     Email           = entity.Email;
     PositionName    = entity.PositionName;
     PhoneNumber     = entity.PhoneNumber;
     Status          = entity.Status;
     FileUrl         = entity.FileUrl;
     HinhAnhChungChi = entity.HinhAnhChungChi;
     IsDelete        = entity.IsDelete;
     Recruitment     = entity.Recruitment;
     DateCreated     = entity.DateCreated;
     DateOfBirth     = entity.DateOfBirth.ToString("dd/MM/yyyy");
     Qualification   = entity.Qualification;
 }
Пример #3
0
 public AdminApplyCvViewModel(ApplyCV entity)
 {
     FullName        = entity.FullName;
     Qualification   = entity.Qualification;
     Slug            = entity.Slug;
     Address         = entity.Address;
     Email           = entity.Email;
     PositionName    = entity.PositionName;
     PhoneNumber     = entity.PhoneNumber;
     FileUrl         = entity.FileUrl;
     HinhAnhChungChi = entity.HinhAnhChungChi;
     ReplyContent    = entity.ReplyContent;
     Status          = entity.Status;
     IsDelete        = entity.IsDelete;
     UserDelete      = entity.UserDelete;
     UserReply       = entity.UserReply;
     DateCreated     = entity.DateCreated;
     DateOfBirth     = entity.DateOfBirth;
     LastUpdated     = DateTime.Now;
     Recruitment     = entity.Recruitment;
 }
        public ApplyCV ToEntity()
        {
            var recruitment = new ApplyCV();

            recruitment.Id              = Guid.NewGuid();
            recruitment.FullName        = FullName;
            recruitment.Address         = Address;
            recruitment.Email           = Email;
            recruitment.PositionName    = PositionName;
            recruitment.Status          = "NEW";
            recruitment.PhoneNumber     = PhoneNumber;
            recruitment.FileUrl         = FileUrl;
            recruitment.HinhAnhChungChi = HinhAnhChungChi;
            recruitment.IsDelete        = false;
            recruitment.DateCreated     = DateTime.Now;
            recruitment.DateOfBirth     = DateTime.ParseExact(DateOfBirth, "dd/MM/yyyy", CultureInfo.InvariantCulture);
            recruitment.LastUpdated     = DateTime.Now;
            recruitment.Qualification   = Qualification;
            recruitment.Recruitment     = Recruitment;

            return(recruitment);
        }
Пример #5
0
 public ApplyCV AddApplyCV(ApplyCV entity)
 {
     entity.Slug = ServiceHelpers.CreateUrl(entity.FullName.Trim());
     return(_context.ApplyCV.Add(entity));
 }
Пример #6
0
 public void UpdateApplyCV(ApplyCV entity)
 {
     _context.Entry(entity).State = System.Data.Entity.EntityState.Modified;
 }