BKI_DichVuMatDat.NghiepVu.NhanSu.f329_lap_hop_dong_v5.print_hop_dong_co_thoi_han C# (CSharp) Method

print_hop_dong_co_thoi_han() private method

private print_hop_dong_co_thoi_han ( DataRow ip_datarow, string ip_str_path ) : void
ip_datarow DataRow
ip_str_path string
return void
        private void print_hop_dong_co_thoi_han(DataRow ip_datarow, string ip_str_path)
        {
            CWordReport v_cwr = new CWordReport("HD_XAC_DINH_THOI_HAN.docx", ip_str_path);
            v_cwr.AddFindAndReplace("<ten_phap_nhan>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.TEN_PHAP_NHAN));
            //v_cwr.AddFindAndReplace("<ten_thong_tu_ban_hanh>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.THONG_TU_BAN_HANH));
            v_cwr.AddFindAndReplace("<chuc_vu_dai_dien_A>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.CHUC_VU_BEN_A));
            v_cwr.AddFindAndReplace("<dia_chi_A>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.DIA_CHI_A));
            v_cwr.AddFindAndReplace("<dien_thoai_A>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.DIEN_THOAI_A));
            v_cwr.AddFindAndReplace("<ten_tgd>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.DAI_DIEN_BEN_A));
            v_cwr.AddFindAndReplace("<quoc_tich_tgd>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.QUOC_TICH_DAI_DIEN_BEN_A));

            v_cwr.AddFindAndReplace("<loai_hop_dong>", ip_datarow["LOAI_HOP_DONG"].ToString());
            v_cwr.AddFindAndReplace("<ten_nv>", ip_datarow["HO_TEN"].ToString());
            v_cwr.AddFindAndReplace("<quoc_tich_nv>", ip_datarow["QUOC_TICH"].ToString());
            v_cwr.AddFindAndReplace("<ngay_sinh>", cat_ngay_thang(ip_datarow["NGAY_SINH_NV"]));
            v_cwr.AddFindAndReplace("<que_quan>", ip_datarow["QUE_QUAN"].ToString());
            v_cwr.AddFindAndReplace("<chuyen_mon>", ip_datarow["CHUYEN_MON"].ToString());
            v_cwr.AddFindAndReplace("<dia_chi>", ip_datarow["DIA_CHI_THUONG_TRU"].ToString());
            v_cwr.AddFindAndReplace("<so_cmt>", ip_datarow["SO_CMT"].ToString());
            v_cwr.AddFindAndReplace("<ngay_cap>", cat_ngay_thang(ip_datarow["NGAY_CAP_CMT"]));
            v_cwr.AddFindAndReplace("<noi_cap>", ip_datarow["NOI_CAP"].ToString());
            v_cwr.AddFindAndReplace("<ngay_bat_dau_hd>", cat_ngay_thang(ip_datarow["NGAY_BAT_DAU"]));
            v_cwr.AddFindAndReplace("<chuc_vu>", ip_datarow["TEN_CHUC_VU"].ToString());
            v_cwr.AddFindAndReplace("<don_vi>", ip_datarow["TEN_DON_VI"].ToString());
            v_cwr.AddFindAndReplace("<mo_ta_cv>", ip_datarow["GHI_CHU"].ToString());
            v_cwr.AddFindAndReplace("<ma_lcd>", ip_datarow["MA_LCD"].ToString());
            v_cwr.AddFindAndReplace("<muc_lcd>", ip_datarow["MUC_LCD"].ToString());
            v_cwr.AddFindAndReplace("<so_tien_lcd>", format_so_tien(ip_datarow["SO_TIEN_LCD_THUC_TE"]));
            v_cwr.AddFindAndReplace("<ngay_hien_tai>", DateTime.Now.Day.ToString());
            v_cwr.AddFindAndReplace("<thang_hien_tai>", DateTime.Now.Month.ToString());
            v_cwr.AddFindAndReplace("<nam_hien_tai>", DateTime.Now.Year.ToString());

            decimal v_dc_id_loai_lao_dong = Convert.ToDecimal(ip_datarow["ID_LOAI_LAO_DONG"]);
            if(v_dc_id_loai_lao_dong == CONST_ID_LOAI_LAO_DONG.TRUC_TIEP)
            {
                v_cwr.AddFindAndReplace("<thoi_gian_lam_viec>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.THOI_GIO_TRUC_TIEP));
            }
            else
            {
                v_cwr.AddFindAndReplace("<thoi_gian_lam_viec>", get_ten_cau_hinh(CONST_ID_CAU_HINH_IN.THOI_GIO_GIAN_TIEP));
            }

            v_cwr.Export2Word();
        }