Ejemplo n.º 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         // Free managed resources
         if (emailManager != null)
         {
             emailManager.Dispose();
             emailManager = null;
         }
         if (emailAccountRepository != null)
         {
             emailAccountRepository.Dispose();
             emailAccountRepository = null;
         }
         if (adminUserRepository != null)
         {
             adminUserRepository.Dispose();
             adminUserRepository = null;
         }
         if (applicationUserRepository != null)
         {
             applicationUserRepository.Dispose();
             applicationUserRepository = null;
         }
     }
 }
Ejemplo n.º 2
0
        //public void Index()
        //{
        //    ProductQuote pq = new ProductQuote();
        //    pq.ProductQuoteID = 999999;
        //    pq.CustomerID = 2;
        //    pq.CustomerName = "Álcalis de la Patagonia S.A.I.C.";
        //    pq.CustomerContactName = "Mariano Emanuelli";
        //    pq.CustomerContactMail = "*****@*****.**";
        //    pq.ProductName = "Amoniaco Anhidro (NH3)";
        //    pq.ProductProviderName = "Profertil S.A. – Planta Bahía Blanca";
        //    pq.ProductPackagingName = "Bolsas";
        //    pq.MinimumQuantityDelivery = 30;
        //    pq.QuantityOpenPurchaseOrder = 190;
        //    pq.Price = (decimal)1300.8;
        //    pq.PaymentDeadlineName = "90 dias FF";
        //    pq.GeographicAreaName = "CABA";
        //    pq.DateQuote = Convert.ToDateTime("28/11/2017");
        //    pq.DateDelivery = Convert.ToDateTime("01/12/2017");


        //    var ret = pdfService.ProductQuoteToPdf(pq);

        //    pq = null;

        //    Response.Clear();
        //    Response.ContentType = "application/pdf";
        //    Response.AddHeader("content-disposition", "attachment;filename=" + ret);
        //    Response.Cache.SetCacheability(HttpCacheability.NoCache);
        //    byte[] bytes = System.IO.File.ReadAllBytes("C:\\Projects\\Inquimex\\Cotizador Online\\ProductQuoteAppProject\\ProductQuoteApp\\Documents\\Export\\" + ret);
        //    //byte[] bytes = System.IO.File.ReadAllBytes("C:\\Personales\\Inquimex\\ProductQuoteAppProject\\ProductQuoteApp\\Documents\\Export\\" + ret);
        //    Response.BinaryWrite(bytes);
        //    Response.End();

        //    //return View(ret);
        //}


        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (emailManager != null)
                {
                    emailManager.Dispose();
                    emailManager = null;
                }
                if (emailAccountRepository != null)
                {
                    emailAccountRepository.Dispose();
                    emailAccountRepository = null;
                }
                if (adminUserRepository != null)
                {
                    adminUserRepository.Dispose();
                    adminUserRepository = null;
                }
            }
            base.Dispose(disposing);
        }