Ejemplo n.º 1
0
        /// <summary>
        /// 检索按钮的Click事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFind_Click(object sender, EventArgs e)
        {
            string beginDate;
            string endDate;
            string opratorId = m_cboCheckMan.SelectItemValue;

            if ((Convert.ToDateTime(m_beginDate.Text)) > (Convert.ToDateTime(m_endDate.Text)))
            {
                MessageBox.Show("开始日期不能大于结束日期。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                m_beginDate.Focus();
                return;
            }


            if (opratorId == "1000")
            {
                opratorId = "";
            }

            if (m_strStatType == "0")//日结
            {
                beginDate = Convert.ToDateTime(m_beginDate.Text).ToString("yyyy-MM-dd 00:00:00");
                endDate   = Convert.ToDateTime(m_beginDate.Text).ToString("yyyy-MM-dd 23:59:59");
            }
            else
            {
                beginDate = Convert.ToDateTime(m_beginDate.Text).ToString("yyyy-MM-dd 00:00:00");
                endDate   = Convert.ToDateTime(m_endDate.Text).ToString("yyyy-MM-dd 23:59:59");
            }

            try
            {
                clsPublic.PlayAvi("findfile.avi", "正在进行数据统计,请稍后...");

                objDomainCtl.m_lngGetRegisterStatData(opratorId, beginDate, endDate, out m_dtbStat);

                objDomainCtl.m_lngGetBillRePrintData(opratorId, beginDate, endDate, out m_dtbRePrint);
                SetDatawindow();
            }
            finally
            {
                clsPublic.CloseAvi();
            }
        }