Example #1
0
        private void btnReck_Click(object sender, EventArgs e)
        {
            if (!IsAllowRec)
            {
                MessageBox.Show("没有待日结的费用。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (this.dwRep.Describe("t_ssrq.text").Trim() != "")
            {
                return;
            }

            frmDayReckoningRemark fremark = new frmDayReckoningRemark();
            DialogResult          dg      = fremark.ShowDialog();

            if (dg == DialogResult.Yes || dg == DialogResult.OK)
            {
                string RemarkInfo = fremark.RemarkInfo;

                if (MessageBox.Show("请再次确认是否日结?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    string        RecDate   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    clsDcl_Charge objCharge = new clsDcl_Charge();
                    long          l         = objCharge.m_lngDayReckoningUnion(EmpID, RecDate, RemarkInfo, RecType);
                    if (l > 0)
                    {
                        this.m_mthRefresh(BeginDate, EndDate);
                        clsPublic.PlayAvi("findFILE.avi", "正在统计结帐费用,请稍候...");
                        this.objReport.m_mthRptReckoningEmpUnion(EmpID, EmpName, true, RecDate, hasRecDate1, hasRecDate2, this.dwRep);
                        clsPublic.CloseAvi();
                        this.btnReck.Enabled = false;
                    }
                    else
                    {
                        MessageBox.Show("日结失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    }
                }
            }
        }