public BusinessLogic(DALFactory dalFactory, IMailService ms, IPdfMaker pdf) { this.db = dalFactory.CreateDatabase(); this.dalFactory = dalFactory; this.ms = ms; this.pdf = pdf; }
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); }
public void SetUp() { factory = DALFactory.GetInstance(); db = factory.CreateDatabase(); }