Ejemplo n.º 1
0
 public NoteUngVienJobMap(NoteUngVienJob item, Dictionary <string, Job> data_job, Dictionary <string, string> dic_cong_ty,
                          Dictionary <string, UngVien> data_ung_vien, List <ThuocTinh> data_thuoc_tinh, bool filter_thuoc_tinh = true)
 {
     this.ghi_chu = item.ghi_chu;
     this.id_job  = item.id_job;
     this.id_note_ung_vien_job   = item.id_note_ung_vien_job;
     this.id_ung_vien            = item.id_ung_vien;
     this.id_user_job            = item.id_user_job;
     this.luong_chinh_thuc       = item.luong_chinh_thuc;
     this.luong_thu_viec         = item.luong_thu_viec;
     this.ngay_di_lam            = item.ngay_di_lam;
     this.ngay_gio_phong_van     = item.ngay_gio_phong_van;
     this.parent_id_ung_vien     = item.parent_id_ung_vien;
     this.ghi_chu_ung_vien       = item.ghi_chu_ung_vien;
     this.ghi_chu_nha_tuyen_dung = item.ghi_chu_nha_tuyen_dung;
     this.so_tien_da_nhan        = item.so_tien_da_nhan;
     this.so_tien_tra_lai        = item.so_tien_tra_lai;
     if (item.thuoc_tinh != null && filter_thuoc_tinh)
     {
         thuoc_tinh = data_thuoc_tinh.Where(x => item.thuoc_tinh.Contains(x.gia_tri)).Select(x => new { gia_tri = x.gia_tri, ten = x.ten, nhom = x.nhom, type = x.type }).ToList();
     }
     else
     {
         if (!filter_thuoc_tinh)
         {
             thuoc_tinh = data_thuoc_tinh;
         }
     }
     if (data_job.TryGetValue(this.id_job, out Job job))
     {
         this.ten_job = job.chuc_danh;
         if (job.cong_ty != null && !string.IsNullOrEmpty(job.cong_ty.id_cong_ty))
         {
             dic_cong_ty.TryGetValue(job.cong_ty.id_cong_ty, out string ten_cong_ty);
             job.cong_ty.ten_cong_ty = ten_cong_ty;
             this.cong_ty            = job.cong_ty.ten_cong_ty;
             this.id_cong_ty         = job.cong_ty.id_cong_ty;
         }
         this.auto_id_job = job.id_auto;
     }
     if (data_ung_vien.TryGetValue(this.id_ung_vien, out UngVien ung_vien))
     {
         this.ho_ten_ung_vien = ung_vien.ho_ten_ung_vien;
         this.so_dien_thoai   = ung_vien.so_dien_thoai;
         this.email           = ung_vien.email;
         this.zalo            = ung_vien.zalo;
     }
     if (thuoc_tinh == null)
     {
         thuoc_tinh = new List <object>();
     }
     if (string.IsNullOrEmpty(this.cong_ty))
     {
         this.cong_ty = "";
     }
     ngay_sua  = item.ngay_sua;
     ngay_tao  = item.ngay_tao;
     nguoi_tao = item.nguoi_tao;
     nguoi_sua = item.nguoi_sua;
 }
Ejemplo n.º 2
0
        public NoteUngVienJobMap(NoteUngVienJob item, Dictionary <string, UngVien> data_ung_vien)
        {
            UngVien ung_vien;

            if (data_ung_vien.TryGetValue(item.id_ung_vien, out ung_vien))
            {
                this.id_note_ung_vien_job = item.id_note_ung_vien_job;
                this.ho_ten_ung_vien      = ung_vien.ho_ten_ung_vien;
                this.id_ung_vien          = ung_vien.id_ung_vien;
            }
        }
        public NoteUngVienJobNhaTuyenDung(NoteUngVienJob item, UngVien ung_vien)
        {
            this.luong_mong_muon  = ung_vien.luong_mong_muon;
            this.dia_chi          = ung_vien.dia_chi;
            this.noi_dung         = ung_vien.noi_dung;
            this.vi_tri_ung_tuyen = ung_vien.vi_tri_ung_tuyen;
            this.ho_ten_ung_vien  = ung_vien.ho_ten_ung_vien;
            this.link_cv          = ung_vien.link_cv;

            this.id_ung_vien            = item.id_ung_vien;
            this.ngay_gio_phong_van     = item.ngay_gio_phong_van;
            this.ghi_chu_ung_vien       = item.ghi_chu_ung_vien;
            this.ghi_chu_nha_tuyen_dung = item.ghi_chu_nha_tuyen_dung;
            this.ghi_chu         = item.ghi_chu;
            id_note_ung_vien_job = item.id_note_ung_vien_job;
        }
Ejemplo n.º 4
0
        public IActionResult GetByIdAuto(string id_auto, string id_ung_vien)
        {
            var get_job     = QLCUNL.BL.JobBL.GetByAutoID(app_id, id_auto);
            var id_job      = get_job.id_job;
            var user_job    = QLCUNL.BL.UserJobBL.GetUserJobByIdJob(app_id, id_job, user);
            var id_user_job = "";

            foreach (var id_userj in user_job)
            {
                if (id_userj.id_user_job != null)
                {
                    id_user_job = id_userj.id_user_job;
                }
            }
            DataResponse res = new DataResponse();

            try
            {
                List <NoteUngVienJob> lst          = new List <NoteUngVienJob>();
                List <string>         id_ung_viens = id_ung_vien.Split(",").ToList();
                foreach (var ung_vien in id_ung_viens)
                {
                    NoteUngVienJob note = new NoteUngVienJob();
                    note.id_job      = id_job;
                    note.id_user_job = id_user_job;
                    note.id_ung_vien = ung_vien;
                    note.nguoi_tao   = user;
                    note.nguoi_sua   = user;
                    note.ngay_tao    = XMedia.XUtil.TimeInEpoch(DateTime.Now);
                    note.ngay_sua    = note.ngay_tao;
                    SetMetaData(note, false);
                    lst.Add(note);
                }
                var count = QLCUNL.BL.NoteUngVienJobBL.IndexMany(lst);
                res.success = count > 0;
            }
            catch (Exception ex)
            {
                res.msg = ex.Message; res.success = false;
            }

            return(Ok(res));
        }
Ejemplo n.º 5
0
        public IActionResult Grant([FromBody] object value)
        {
            DataResponse res = new DataResponse();

            try
            {
                var obj = JToken.Parse(value.ToString());
                List <NoteUngVienJob> lst = new List <NoteUngVienJob>();

                if (obj != null)
                {
                    string        id_user_job  = obj["id_user_job"].ToString();
                    string        id_job       = obj["id_job"].ToString();
                    List <string> id_ung_viens = obj["id_ung_viens"].ToObject <List <string> >();

                    foreach (var id_ung_vien in id_ung_viens)
                    {
                        var            ung_vien = BL.UngVienBL.GetById(id_ung_vien)?.noi_dung;
                        NoteUngVienJob note     = new NoteUngVienJob();
                        note.id_job      = id_job;
                        note.id_user_job = id_user_job;
                        note.id_ung_vien = id_ung_vien;
                        if (!string.IsNullOrEmpty(ung_vien))
                        {
                            note.ghi_chu = ung_vien;
                        }
                        note.nguoi_tao = user;
                        note.nguoi_sua = user;
                        note.ngay_tao  = XMedia.XUtil.TimeInEpoch(DateTime.Now);
                        note.ngay_sua  = note.ngay_tao;
                        SetMetaData(note, false);
                        lst.Add(note);
                    }
                }
                var count = QLCUNL.BL.NoteUngVienJobBL.IndexMany(lst);
                res.success = count > 0;
            }
            catch (Exception ex)
            {
                res.msg = ex.Message; res.success = false;
            }
            return(Ok(res));
        }
Ejemplo n.º 6
0
 public static bool UpdateGioPhongVan(NoteUngVienJob data)
 {
     return(NoteUngVienJobRepository.Instance.UpdateGioPhongVan(data));
 }
Ejemplo n.º 7
0
 public static bool UpdateThuocTinh(NoteUngVienJob data)
 {
     return(NoteUngVienJobRepository.Instance.UpdateThuocTinh(data));
 }
Ejemplo n.º 8
0
 public static string Index(NoteUngVienJob data)
 {
     return(NoteUngVienJobRepository.Instance.Index(data));
 }
Ejemplo n.º 9
0
        public IActionResult GetByAutoID(string id_auto, string id_ung_vien)
        {
            var          get_job = QLCUNL.BL.JobBL.GetByAutoID(app_id, id_auto);
            DataResponse res     = new DataResponse();

            if (get_job != null)
            {
                var id_job   = get_job.id_job;
                var user_job = QLCUNL.BL.UserJobBL.GetUserJobByIdJob(app_id, id_job, user);

                if (user_job.Count > 0)
                {
                    var id_user_job = "";
                    foreach (var id_userj in user_job)
                    {
                        if (id_userj.id_user_job != null)
                        {
                            id_user_job = id_userj.id_user_job;
                        }
                    }
                    try
                    {
                        List <NoteUngVienJob> lst          = new List <NoteUngVienJob>();
                        List <string>         id_ung_viens = id_ung_vien.Split(",").ToList();
                        foreach (var ung_vien in id_ung_viens)
                        {
                            var            tt_ungvien = BL.UngVienBL.GetById(ung_vien)?.noi_dung;
                            NoteUngVienJob note       = new NoteUngVienJob();
                            note.id_job      = id_job;
                            note.id_user_job = id_user_job;
                            note.id_ung_vien = ung_vien;
                            if (!string.IsNullOrEmpty(tt_ungvien))
                            {
                                note.ghi_chu = tt_ungvien;
                            }
                            note.nguoi_tao = user;
                            note.nguoi_sua = user;
                            note.ngay_tao  = XMedia.XUtil.TimeInEpoch(DateTime.Now);
                            note.ngay_sua  = note.ngay_tao;
                            SetMetaData(note, false);
                            lst.Add(note);
                        }
                        var count = QLCUNL.BL.NoteUngVienJobBL.IndexMany(lst);
                        res.success = count > 0;
                    }
                    catch (Exception ex)
                    {
                        res.msg = ex.Message; res.success = false;
                    }

                    return(Ok(res));
                }

                res.msg     = "Bạn phải gán JOB cho mình trước!";
                res.success = false;
                return(Ok(res));
            }
            res.msg     = "Không tìm thấy JOB theo Auto ID này!";
            res.success = false;
            return(Ok(res));
        }