Ejemplo n.º 1
0
        /// <summary>
        /// 审核收据
        /// </summary>
        public void m_mthConfirmRec()
        {
            System.Collections.ArrayList arrConDate     = new System.Collections.ArrayList();
            System.Collections.ArrayList arrRemoveRowNO = new System.Collections.ArrayList();
            com.digitalwave.iCare.ValueObject.clsInvoceRecBill_VO objReceiptVo = null;
            for (int i1 = 0; i1 < this.m_objViewer.m_dgnotConfirm.Rows.Count; i1++)
            {
                if (this.m_objViewer.m_dgnotConfirm.Rows[i1].Cells[0].Value.ToString() == "T")
                {
                    if (this.m_objViewer.m_dgnotConfirm.Rows[i1].Tag != null)
                    {
                        arrRemoveRowNO.Add(i1);
                        objReceiptVo = (com.digitalwave.iCare.ValueObject.clsInvoceRecBill_VO) this.m_objViewer.m_dgnotConfirm.Rows[i1].Tag;
                        arrConDate.Add(objReceiptVo.strCollectDate);
                    }
                }
            }
            if (arrConDate.Count > 0)
            {
                try
                {
                    if (this.m_objViewer.m_dwShow.RowCount == 0)
                    {
                        return;
                    }
                    int CurrRow = this.m_objViewer.m_dwShow.CurrentRow;
                    this.m_objViewer.m_dwShow.AcceptText();
                    #region 生成数据

                    objReceiptVo = new com.digitalwave.iCare.ValueObject.clsInvoceRecBill_VO();
                    if (!this.m_mthGenerateVO(CurrRow, ref objReceiptVo))
                    {
                        return;
                    }

                    #endregion
                }
                catch (Exception)
                {
                    MessageBox.Show(this.m_objViewer, "即将审核的内容不完整,请补充完整再审核!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                if (objReceiptVo.strReceiptNo.Trim() == "")
                {
                    //MessageBox.Show(this.m_objViewer, "请输入收据号码!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                long lngRes = objDomain.m_lngConfirmRecord(arrConDate, objReceiptVo);
                if (lngRes > 0)
                {
                    int intRowNO = 0;
                    this.m_mthUpdateDataGrid(arrRemoveRowNO, objReceiptVo, ref intRowNO);
                    this.m_objViewer.tabControl1.SelectedIndex = 1;
                    this.m_objViewer.m_dgvConfirm.Rows[intRowNO].Cells[0].Selected = true;
                    this.m_objViewer.btnSave.Tag = objReceiptVo.strReceiptNo;
                }
                else if (lngRes == -2)
                {
                    MessageBox.Show(this.m_objViewer, "已有数据号,请重新输入一个新的收据号", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show(this.m_objViewer, "未选中任何未审核记录", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }