Exemple #1
0
 public BusinessLogic(DALFactory dalFactory, IMailService ms, IPdfMaker pdf)
 {
     this.db = dalFactory.CreateDatabase();
     this.dalFactory = dalFactory;
     this.ms = ms;
     this.pdf = pdf;
 }
Exemple #2
0
 public BusinessLogic(DALFactory dalFactory)
 {
     this.db = dalFactory.CreateDatabase();
     this.dalFactory = dalFactory;
     var appSettings = ConfigurationManager.AppSettings;
     var smtpServer = appSettings["smtpServer"];
     var mailAddress = new MailAddress(appSettings["mailAddress"], appSettings["sender"]);
     var user = appSettings["user"];
     var pwd = appSettings["pwd"];
     var port = int.Parse(appSettings["port"]);
     ms = new MailService(smtpServer, port, user, pwd, mailAddress);
     pdfPath = appSettings["pdfPath"];
     pdfName = appSettings["pdfName"];
     pdf = new PdfMaker(pdfPath, pdfName);
 }
Exemple #3
0
 public void SetUp()
 {
     factory = DALFactory.GetInstance();
     db = factory.CreateDatabase();
 }