/// <summary> /// 重打预交金发票 /// </summary> internal void RePrintInvoice() { if (this.m_objViewer.m_dataGridViewRs.SelectedRows.Count == 0) { MessageBox.Show("请选择需要重打的预交金记录。"); return; } string prepayId = this.m_objViewer.m_dataGridViewRs.SelectedRows[0].Cells["PREPAYID_CHR"].Value.ToString(); string preInvoNo = this.m_objViewer.m_dataGridViewRs.SelectedRows[0].Cells["PREPAYINV_VCHR"].Value.ToString(); string preStatus = this.m_objViewer.m_dataGridViewRs.SelectedRows[0].Cells["PAYTYPE_INT"].Value.ToString(); if (preStatus == "正常" || preStatus == "恢复") { // 正常预交.微信 frmPrePayRepeatPrn fpprp = new frmPrePayRepeatPrn(preInvoNo, 0, this.m_objViewer.LoginInfo.m_strEmpID); if (fpprp.ShowDialog() == DialogResult.OK) { string prntype = fpprp.PrnType; string newno = fpprp.NewNo; if (prntype == "1") { clsPBNetPrint.m_mthPrintPrepayBill(prepayId, ""); } else if (prntype == "2") { clsDcl_PrePay dclPrepay = new clsDcl_PrePay(); long l = dclPrepay.m_lngSaveRepeatPrn(prepayId, preInvoNo, newno, this.m_objViewer.LoginInfo.m_strEmpID, "1"); if (l > 0) { clsPBNetPrint.m_mthPrintPrepayBill(prepayId, newno); clsPublic.m_blnSaveCurrInvoiceNo(this.m_objViewer.LoginInfo.m_strEmpID, newno, 2); clsPublic.m_blnWriteXML("BeInHospital", "CurrPrepayBillNo", "AnyOne", newno); } else { MessageBox.Show("保存重打信息失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop); } dclPrepay = null; } else if (prntype == "3") { clsPBNetPrint.m_mthPrintPrepayBill(prepayId, newno); } } } else { MessageBox.Show("不能重打。"); } }
private void btnPrint_Click(object sender, EventArgs e) { if (CurrChargeNo != "") { if (RepeatPrtInvono != "" && CompletePrt == false) { clsDcl_PrePay objPrePay = new clsDcl_PrePay(); long l = objPrePay.m_lngSaveRepeatPrn(CurrChargeNo, CurrInvoNo, RepeatPrtInvono, this.LoginInfo.m_strEmpID, "2"); if (l == 0) { MessageBox.Show("保存发票重打记录失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } clsPublic.m_blnSaveCurrInvoiceNo(this.LoginInfo.m_strEmpID, RepeatPrtInvono, 1); } clsPBNetPrint.m_mthPrintInvoiceBill(CurrChargeNo, RepeatPrtInvono, 2, this.HospitalName); } }