Example #1
0
 private CAD()
 {
     XMLLoader xml = new XMLLoader(XMLLoader.CONFIG_TYPE.SQL_Server_Config);
     this.cnx = (string)xml.LoadConfig().Data[0];
     this.oCNX = new OleDbConnection(this.cnx);
     this.oCMD = new OleDbCommand();
     this.oDA = new OleDbDataAdapter();
 }
Example #2
0
        private ComSMTP()
        {
            xml = new XMLLoader(XMLLoader.CONFIG_TYPE.SMTP_Config);
            config = (SMTPConfig)this.GetSmtpConfig().Data[0];
            message = new MailMessage();
            smtp = new SmtpClient();
            basicCredential = new NetworkCredential(config.Username, config.Password);
            smtp.UseDefaultCredentials = false;
            smtp.Credentials = basicCredential;

        }