Exemplo n.º 1
0
 /// <summary>
 /// button click event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void lnkGeneratePDF_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable distributorCartData = CartPDFHelper.GetLoggedInUserCartData(InventoryType, CurrentUser.UserID, OpenCampaign?.CampaignID);
         var       pdfBytes            = CartPDFHelper.CreateProductPDF(distributorCartData, InventoryType);
         CartPDFHelper.WriteresponseToPDF(pdfBytes);
     }
     catch (Exception ex)
     {
         EventLogProvider.LogInformation("GeneratePDFforCart", "lnkGeneratePDF_Click", ex.Message);
     }
 }
 /// <summary>
 /// Save pdf click event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void lnkSaveasPDF_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable distributorCartData = CartPDFHelper.GetDistributorCartData(CartID, InventoryType, OpenCampaignID);
         var pdfBytes = CartPDFHelper.CreateProductPDF(distributorCartData, InventoryType);
         CartPDFHelper.WriteresponseToPDF(pdfBytes);
     }
     catch (Exception ex)
     {
         EventLogProvider.LogInformation("Kadena_CMSWebParts_Kadena_Cart_DistributorCartDetails", "lnkSaveasPDF_Click", ex.Message);
     }
 }