示例#1
0
        private void btnChooseFile_Click(object sender, EventArgs e)
        {
            ChooseFileUpload dlg = new ChooseFileUpload();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                settingChooseFile = new SettingChooseFile();
                settingChooseFile.HT_ThongTinBN          = dlg.Get_HT_ThongTinCoBan();
                settingChooseFile.HT_ThongTinVoBN        = dlg.Get_HT_ThongTinVoBN();
                settingChooseFile.HT_ThongTinNVD         = dlg.Get_HT_ThongTinNVD();
                settingChooseFile.HT_ThongTinDacTrungNH  = dlg.Get_HT_DacTrungNH();
                settingChooseFile.HT_ThongTinKhamNamKhoa = dlg.Get_HT_KhamNamKhoa();
                settingChooseFile.HT_ThongTinLuuTruMau   = dlg.Get_HT_LuuTruMau();
                settingChooseFile.HT_ThongTinTinhDichDo  = dlg.Get_HT_TinhDichDo();
                settingChooseFile.HT_ThongTinKQXN        = dlg.Get_HT_KetQuaXN();

                settingChooseFile.HN_ThongTinBN                  = dlg.Get_HN_ThongTinCoBan();
                settingChooseFile.HN_ThongTinNVD                 = dlg.Get_HN_ThongTinNVD();
                settingChooseFile.HN_ThongTinTienSuSS            = dlg.Get_HN_KhamTienSuSinhSan();
                settingChooseFile.HN_ThongTinTieuSuKN            = dlg.Get_HN_KhamTieuSuKN();
                settingChooseFile.HN_ThongTinBenhTinhDuc         = dlg.Get_HN_BenhTinhDuc();
                settingChooseFile.HN_ThongTinBenhToanThan        = dlg.Get_HN_BenhToanThan();
                settingChooseFile.HN_ThongTinKhamHongVaXuongChau = dlg.Get_HN_KhamHongXuongChau();
                settingChooseFile.HN_ThongTinKQXN                = dlg.Get_HN_KetQuaXN();
                settingChooseFile.HN_ThongTinHoiBenh             = dlg.Get_HN_HoiBenh();

                btnChooseFile.Enabled = false;
            }
        }
示例#2
0
        void BeginPushData(SettingChooseFile setting)
        {
            string connectionString = txtConnString.Text;

            DBLib.SMTPSetting smtpSetting = new DBLib.SMTPSetting(txtMailServerAddress.Text, Convert.ToInt32(txtSMTPServerPort.Text), txtUser.Text, txtPassword.Text, chkEnableSecurity.Checked, chkUseGmail.Checked);
            smtpSetting.MailAddressSend    = txtUser.Text;
            smtpSetting.MailAddressReceive = txtMailTo.Text;

            if (chkEnableSecurity.Checked)
            {
                smtpSetting.CAPath = txtCAPath.Text;
            }

            dbLibClient = new DBLib.DBClientApi("TTHTSS", smtpSetting, setting);
            dbLibClient.LoginMailServer();

            dbLibClient.intervalRequest  = Convert.ToDouble(txtTimerInterval.Text);
            dbLibClient.connectionString = connectionString;

            processReadMail = new Thread(MethodSendMail);
            processReadMail.Start(dbLibClient);
        }