Пример #1
0
        public PrintTicket(TicketPrinter printer, ChongZhiData chongzhiData, bool isPrev)
        {
            InitializeComponent();
            this.isPrev       = isPrev;
            id                = chongzhiData.AID;
            this.chongzhiData = chongzhiData;
            ticketPrinter     = printer;
            isRePrint         = Convert.ToBoolean(chongzhiData.IsPrint);

            strURL = string.Format("{0}/IotM/SFXT/Payment.html", LoginChecker.getInstance().CompanyAccount.ServiceURL);
            this.webKitBrowser1.Url = new System.Uri(strURL, System.UriKind.Absolute);
        }
        private void btnPrint_Click(object sender, EventArgs e)
        {
            ChongZhiData czData = this.dataGridView1.CurrentRow.DataBoundItem as ChongZhiData;

            if (czData == null)
            {
                return;
            }

            new PrintTicket(printer, czData, this.checkBox1.Checked).ShowDialog();
            this.webKitBrowser1.Navigate(strURL);
            this.isSelected = false;
        }