示例#1
0
        private void dgv_Main_DoubleClick(object sender, EventArgs e)
        {
            string v_Invoice      = dgv_Main.CurrentRow.Cells["InvoiceCode"].Value.ToString();
            string v_Provider     = dgv_Main.CurrentRow.Cells["供应商"].Value.ToString();
            string v_ProviderName = dgv_Main.CurrentRow.Cells["ProviderName"].Value.ToString();
            string v_PZH          = txtPZH.Text;

            int intInvoiceType = dgv_Main.CurrentRow.Cells["InvoiceType"].Value.ToString() == "普通发票" ? 0 : 1;

            if (txtInvoice.Text.Trim() == "")
            {
                MessageBox.Show("请输入发票号", "提示");
            }
            else if (txtProvider.Tag.ToString().Trim() == "" || txtProvider.Text.Trim() == "")
            {
                MessageBox.Show("请输入供应商", "提示");
            }
            else
            {
                发票明细清单 FrmFp = new 发票明细清单(txtInvoice.Text.Trim(), txtProvider.Tag.ToString(),
                                          txtProvider.Text, intInvoiceType, txtPZH.Text, m_authFlag);
                FrmFp.ShowDialog();
            }

            dgv_Main.DataSource = GetProviderName(m_findVoice.GetInvoiceInfo(dtp_Start.Value, dtp_End.Value));
            PositioningRecord(v_PZH);
        }
示例#2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (CheckDate())
            {
                if (m_findVoice.GetInvoiceInfo(txtInvoice.Text.Trim()).Rows.Count != 0)
                {
                    MessageBox.Show("录入的发票号重复,请重新录入", "提示");
                    return;
                }

                发票明细清单 FrmFp = new 发票明细清单(txtInvoice.Text.Trim(), txtProvider.Tag.ToString(),
                                          txtProvider.Text, m_intInvoiceType, txtPZH.Text, m_authFlag);
                FrmFp.ShowDialog();

                dgv_Main.DataSource = GetProviderName(m_findVoice.GetInvoiceInfo(dtp_Start.Value, dtp_End.Value));
            }
        }