private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { // TODO: dispose managed state (managed objects). if (_emailManager != null) { _emailManager.Dispose(); _emailManager = null; } if (_emailAccountRepository != null) { _emailAccountRepository.Dispose(); _emailAccountRepository = null; } } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }
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; } } }
//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); }