예제 #1
0
 private void lblPrint_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (plInvoice.Tag != null)
     {
         HIS.MZ_BLL.Invoice invoice = (HIS.MZ_BLL.Invoice)plInvoice.Tag;
         if (MessageBox.Show("确认要重打的发票的发票号与电脑号一致?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             PrintController.PrintChargeInvoice(new Invoice[] { invoice });
         }
     }
 }
예제 #2
0
        private void dgvList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string invoiceNo   = dgvList["InvoiceNo", dgvList.CurrentCell.RowIndex].Value.ToString( );
            string perfChar    = dgvList[PERFCHAR.Name, dgvList.CurrentCell.RowIndex].Value.ToString( );
            int    invoiceType = Convert.ToInt32(dgvList["HANG_FLAG", dgvList.CurrentCell.RowIndex].Value);

            if (invoiceType == 0)
            {
                return;
            }

            HIS.MZ_BLL.Invoice invoice = new HIS.MZ_BLL.Invoice(perfChar, invoiceNo, HIS.MZ_BLL.OPDBillKind.门诊收费发票);

            lblTotal.Text     = invoice.TotalPay.ToString( );
            lblPayType.Text   = invoice.PayType;
            lblCash.Text      = invoice.CashPay.ToString( );
            lblTally.Text     = invoice.VillagePay.ToString( );
            lblPos.Text       = invoice.PosPay.ToString( );
            lblFavor.Text     = invoice.FavorPay.ToString( );
            lblSelfTally.Text = invoice.SelfTally.ToString( );
            dgvInoviceItems.Rows.Clear( );
            //2010-5-28 20100528.1.01 门诊票据查询
            if (invoice.Items.Length == 0)
            {
                return;
            }

            dgvInoviceItems.Rows.Add();
            dgvInoviceItems["ItemName", dgvInoviceItems.Rows.Count - 1].Value = invoice.Items[0].ItemName.Trim();
            dgvInoviceItems["ItemCost", dgvInoviceItems.Rows.Count - 1].Value = invoice.Items[0].Cost;
            for (int i = 1; i < invoice.Items.Length; i++)
            {
                if (invoice.Items[i].ItemName.Trim() != invoice.Items[i - 1].ItemName.Trim())
                {
                    dgvInoviceItems.Rows.Add();
                    dgvInoviceItems["ItemName", dgvInoviceItems.Rows.Count - 1].Value = invoice.Items[i].ItemName.Trim();
                    dgvInoviceItems["ItemCost", dgvInoviceItems.Rows.Count - 1].Value = invoice.Items[i].Cost;
                }
            }
            plInvoice.Tag     = invoice;
            plInvoice.Visible = true;
        }