コード例 #1
0
        private void ViewInvoice()
        {
            //grdList.Rows[bsList.Position]
            BLSAInvoice bLSAInvoice = new BLSAInvoice();
            string      trans       = bLSAInvoice.GetSAInvoiceTransactionID(((ClientApp.UI.Report.ReportDataSet.SAInvoiceViewerRow)((System.Data.DataRowView)bsList.Current).Row).RefID);
            WebClient   client      = new WebClient();
            string      reply       = client.DownloadString("https://meinvoice.vn/tra-cuu/GetRequestTimeEnCode");
            var         link        = String.Format("http://meinvoice.vn/tra-cuu/downloadhandler.ashx?type=pdf&code={0}&viewer=1&ext={1}", trans, reply.ToString().Substring(55, 8));

            Process.Start(link);
        }
コード例 #2
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         //using (var f = new FrmPrintInvoice())
         //{
         //    f.SAInvoiceID = SAInvoiceRow.RefID;
         //    f.ShowDialog();
         //}
         BLSAInvoice bLSAInvoice = new BLSAInvoice();
         string      trans       = bLSAInvoice.GetSAInvoiceTransactionID(Guid.Parse(dsDictionary.SAInvoice.Rows[0]["RefID"].ToString()));
         WebClient   client      = new WebClient();
         string      reply       = client.DownloadString("https://meinvoice.vn/tra-cuu/GetRequestTimeEnCode");
         var         link        = String.Format("http://meinvoice.vn/tra-cuu/downloadhandler.ashx?type=pdf&code={0}&viewer=1&ext={1}", trans, reply.ToString().Substring(55, 8));
         Process.Start(link);
     }
     catch (Exception ex)
     {
         MessageBoxCommon.ShowException(ex);
     }
 }