コード例 #1
0
 /// <summary>
 /// Function to print purchase invoice
 /// </summary>
 /// <param name="decMasterId"></param>
 public void Print(decimal decMasterId)
 {
     try
     {
         PurchaseMasterSP spPurchaseMaster = new PurchaseMasterSP();
         decimal decPurchaseOrderMasterId = 0;
         decimal decMaterialReceiptMasterId = 0;
         if (cmbPurchaseMode.Text == "Against PurchaseOrder")
         {
             decPurchaseOrderMasterId = Convert.ToDecimal(cmbOrderNo.SelectedValue.ToString());
         }
         else if (cmbPurchaseMode.Text == "Against MaterialReceipt")
         {
             decMaterialReceiptMasterId = Convert.ToDecimal(cmbOrderNo.SelectedValue.ToString());
         }
         DataSet dsPurchaseInvoice = spPurchaseMaster.PurchaseInvoicePrinting(1, decPurchaseOrderMasterId, decMaterialReceiptMasterId, decMasterId);
         frmReport frmReport = new frmReport();
         frmReport.MdiParent = formMDI.MDIObj;
         frmReport.PurchaseInvoicePrinting(dsPurchaseInvoice);
     }
     catch (Exception ex)
     {
         MessageBox.Show("PI57:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }