Exemplo n.º 1
0
        private void frmMidCharge_Load(object sender, EventArgs e)
        {
            #region 读出发票号
            bool              b      = false;
            string            invono = clsPublic.m_strGetCurrInvoiceNo(this.LoginInfo.m_strEmpID, 1);
            frmIPInvoiceinput fo     = new frmIPInvoiceinput();
            fo.txtInvono.Text      = invono;
            this.Visible           = false;
            this.timerInvo.Enabled = false;
            if (fo.ShowDialog() == DialogResult.Cancel)
            {
                b = true;
            }
            else
            {
                #region 发票号检验
                invono = fo.txtInvono.Text.Trim();
                if (!clsPublic.m_blnCheckInvoExpression(invono))
                {
                    MessageBox.Show("输入的发票号不符合规定的发票号规则,请修改。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    b = true;
                }
                if (clsPublic.m_blnCheckInvoIsUsed(invono))
                {
                    MessageBox.Show("输入的发票号已经被使用,请修改。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    b = true;
                }
                #endregion
            }

            if (b)
            {
                noopen = true;
                this.timerInvo.Enabled  = true;
                this.timerInvo.Interval = 3000;
                return;
            }
            else
            {
                this.InvoNo             = invono;
                this.timerInvo.Enabled  = true;
                this.timerInvo.Interval = 1000;
                this.Cursor             = Cursors.WaitCursor;
            }
            #endregion

            clsPublic.SuspendLayout(ucPatientInfo.Handle);
            this.ucPatientInfo.Status = 1;
            this.rdoZq.Checked        = true;
            this.timer.Enabled        = true;
        }
Exemplo n.º 2
0
        private void frmLeaveCharge_Load(object sender, EventArgs e)
        {
            #region 读出发票号
            bool              b      = false;
            string            invono = clsPublic.m_strGetCurrInvoiceNo(this.LoginInfo.m_strEmpID, 1);
            frmIPInvoiceinput fo     = new frmIPInvoiceinput();
            fo.txtInvono.Text      = invono;
            this.Visible           = false;
            this.timerInvo.Enabled = false;
            if (fo.ShowDialog() == DialogResult.Cancel)
            {
                b = true;
            }
            else
            {
                #region 发票号检验
                invono = fo.txtInvono.Text.Trim();
                if (!clsPublic.m_blnCheckInvoExpression(invono))
                {
                    MessageBox.Show("输入的发票号不符合规定的发票号规则,请修改。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    b = true;
                }
                if (clsPublic.m_blnCheckInvoIsUsed(invono))
                {
                    MessageBox.Show("输入的发票号已经被使用,请修改。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    b = true;
                }
                #endregion
            }

            if (b)
            {
                noopen = true;
                this.timerInvo.Enabled  = true;
                this.timerInvo.Interval = 3000;
                return;
            }
            else
            {
                this.InvoNo             = invono;
                this.timerInvo.Enabled  = true;
                this.timerInvo.Interval = 1000;
                this.Cursor             = Cursors.WaitCursor;
            }
            #endregion

            clsPublic.SuspendLayout(ucPatientInfo.Handle);
            this.ucPatientInfo.Status = 8;

            //if (clsPublic.m_strGetSysparm("1000") == "001")
            //{
            //    this.btnYb.Visible = true;
            //}
            //else
            //{
            this.btnYb.Visible = false;
            //}
            this.dtgDetail.AutoGenerateColumns = false;
            ((clsCtl_LeaveCharge)this.objController).m_mthInt();
            this.timer.Enabled = true;
        }