コード例 #1
0
 /// <summary>
 /// Print transacrion slip
 /// </summary>
 /// <param name="drBalance">transaction record</param>
 /// <param name="strFillType">Transaction type</param>
 void Print(DataRow drBalance, string strFillType)
 {
     try
     {
         if (drBalance != null)
         {
             using (CReportViewer cReportViewer = new CReportViewer())
             {
                 cReportViewer.ShowVaultCurrentTransactionSlip(int.Parse(drBalance["Vault_ID"].ToString()), drBalance["Name"].ToString(), drBalance["Serial_NO"].ToString(), drBalance["Manufacturer_Name"].ToString(),
                                                               drBalance["Type_Prefix"].ToString(), SecurityHelper.CurrentUser.DisplayName, Convert.ToDateTime(drBalance["CreatedDate"]), Convert.ToBoolean(drBalance["IsWebServiceEnabled"]),
                                                               Convert.ToDecimal(drBalance["FillAmount"]), Convert.ToDecimal(drBalance["TotalAmountOnFill"]), Convert.ToDecimal(drBalance["CurrentBalance"]), strFillType);
                 cReportViewer.SetOwner(System.Windows.Window.GetWindow(this));
                 cReportViewer.Show();
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }