Exemple #1
0
        private void gui_email_cap_nhat_don_hang()
        {
            string v_str_email_dvmc    = f002_main_form.m_str_email_dvmc;
            string v_str_password_dvmc = CEncryptKeyString.DecryptString(f002_main_form.m_str_password_dvmc);
            string to                = m_us_v_gd_dat_hang.strUSER_NV_DAT_HANG + "@topica.edu.vn";
            string v_str_subject     = "";
            string v_str_content     = "";
            string v_str_bcc_list    = "";
            string v_str_link_portal = f002_main_form.m_str_url_xac_nhan_don_hang;

            v_str_link_portal = v_str_link_portal.Replace("<MA_DON_HANG>", m_us_v_gd_dat_hang.strMA_DON_HANG);
            v_str_subject     = m_ds_dm_mau_mail_cap_nhat_don_hang.DM_MAU_EMAIL.Rows[0][DM_MAU_EMAIL.TIEU_DE_MAIL].ToString();
            v_str_content     = m_ds_dm_mau_mail_cap_nhat_don_hang.DM_MAU_EMAIL.Rows[0][DM_MAU_EMAIL.NOI_DUNG_EMAIL].ToString();

            // Find and replace thông tin trong content mail
            v_str_content = v_str_content.Replace("MA_DON_HANG", m_us_v_gd_dat_hang.strMA_DON_HANG);
            v_str_content = v_str_content.Replace("LINK_VIEW_DON_HANG", v_str_link_portal);
            v_str_content = v_str_content.Replace("THONG_TIN_THAY_DOI", m_us_v_gd_dat_hang.strLICH_SU_TRAO_DOI);
            v_str_content = v_str_content.Replace("NOI_DUNG_DON_HANG", m_us_v_gd_dat_hang.strNOI_DUNG_DAT_HANG);
            v_str_content = v_str_content.Replace("USER_NHAN_VIEN", m_us_v_gd_dat_hang.strUSER_NV_DAT_HANG);
            v_str_content = v_str_content.Replace("USER_DON_VI", m_cbo_dv_don_vi.Text);
            v_str_content = v_str_content.Replace("USER_DIEN_THOAI", m_us_v_gd_dat_hang.strDIEN_THOAI);
            v_str_content = v_str_content.Replace("USER_THOI_GIAN_DAT_HANG", m_us_v_gd_dat_hang.datTHOI_GIAN_DAT_HANG.ToString());
            v_str_content = v_str_content.Replace("LOAI_DICH_VU_HO_TRO", m_cbo_loai_dich_vu.Text);
            v_str_content = v_str_content.Replace("YEU_CAU_CU_THE", m_us_v_gd_dat_hang.strNOI_DUNG_DAT_HANG);
            v_str_content = v_str_content.Replace("THOI_GIAN_MONG_MUON_SUA_XONG", m_str_loai_thoi_gian_hoan_thanh);
            v_str_content = v_str_content.Replace("PHAN_HOI_CUA_DVMC", m_us_v_gd_dat_hang.strPHAN_HOI_TU_DVMC);
            v_str_content = v_str_content.Replace("NGUOI_XU_LY_DON_HANG", m_us_v_gd_dat_hang.strNGUOI_XU_LY);
            v_str_content = v_str_content.Replace("NGUOI_NHAN_DAT_HANG", m_cbo_nguoi_nhan_dat_hang.Text);
            v_str_content = v_str_content.Replace("LICH_SU_TRAO_DOI", m_txt_lich_su_trao_doi.Text);

            v_str_content  = v_str_content + f002_main_form.m_str_chu_ky_dvmc;
            v_str_subject  = v_str_subject.Replace("<MA_DON_HANG>", m_us_v_gd_dat_hang.strMA_DON_HANG);
            v_str_bcc_list = get_bcc_mail();
            try
            {
                HelpUtils.send_mail("Dịch Vụ Một Cửa", v_str_email_dvmc, v_str_password_dvmc, to, v_str_bcc_list, v_str_subject, v_str_content);
            }
            catch (Exception v_e)
            {
                CSystemLog_100.ExceptionHandle(v_e, "Gửi email thông báo cho khách hàng lỗi.  Hãy xem lại cấu hình email DVMC!");
            }
        }
Exemple #2
0
        private void us_object_2_form()
        {
            m_chk_is_admin.Checked = CIPConvert.ToBoolean(m_us_user.strBUILT_IN_YN);
            if (m_chk_is_admin.Checked)
            {
                m_chk_is_admin.Text = "có";
            }
            else
            {
                m_chk_is_admin.Text = "Không";
            }
            m_txt_ten_truy_cap.Text = m_us_user.strTEN_TRUY_CAP;
            m_txt_ten.Text          = m_us_user.strTEN;
//			m_txt_mat_khau.Text = m_us_user.strMAT_KHAU;
//			m_txt_go_lai_mat_khau.Text = m_us_user.strMAT_KHAU;
            m_txt_mat_khau.Text            = CIPConvert.Deciphering(m_us_user.strMAT_KHAU);
            m_txt_go_lai_mat_khau.Text     = CIPConvert.Deciphering(m_us_user.strMAT_KHAU);
            m_cbo_trang_thai.SelectedIndex = (int)CIPConvert.ToDecimal(m_us_user.strTRANG_THAI);
            m_cbo_nhom_quyen.SelectedValue = m_us_user.dcID_NHOM_NGUOI_DUNG;
            m_txt_email.Text          = m_us_user.strEMAIL;
            m_txt_password_email.Text = CEncryptKeyString.DecryptString(m_us_user.strMAT_KHAU_EMAIL);
        }