Ejemplo n.º 1
0
        /// <summary>
        /// 查找按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string strDateFrom = this.dtpDateFrom.Value.ToString("yyyy-MM-dd 00:00:00");
            string strDateTo   = this.dtpDateTo.Value.ToString("yyyy-MM-dd 23:59:59");

            //this.Cursor = Cursors.WaitCursor;
            DataTable m_dtbOccurRate = new DataTable();

            clsController_SamplesCheckTotal objAnimalculeCheckTotal = new clsController_SamplesCheckTotal();
            long lngRes = objAnimalculeCheckTotal.m_lngGetAnimalculeCheckTotoal(out m_dtbOccurRate, strDateFrom, strDateTo, GetCheckList(clbSamples), GetCheckList(clbPatientArea));


            if (lngRes > 0 && m_dtbOccurRate != null && m_dtbOccurRate.Rows.Count > 0)
            {
                string strReportPath = @"lis_reports\cryAnimalculeCheckTotal.rpt";
                m_mthBindDataToReport(rdAnimalculeCheckTotal, strReportPath, m_dtbOccurRate);

                //传值给报表

                this.rdAnimalculeCheckTotal.SetParameterValue(0, GetCheckedItemString(clbSamples));
                this.rdAnimalculeCheckTotal.SetParameterValue(1, GetCheckedItemString(clbPatientArea));
                this.rdAnimalculeCheckTotal.SetParameterValue(2, strDateFrom.Substring(0, 10));
                this.rdAnimalculeCheckTotal.SetParameterValue(3, strDateTo.Substring(0, 10));

                //显示报表
                this.crvAnimalCuleCheckTotal.ReportSource = rdAnimalculeCheckTotal;
            }
            else
            {
                MessageBox.Show("没有符合条件的记录!");
                return;
            }
        }
Ejemplo n.º 2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string strDateFrom = this.dtpDateFrom.Value.ToShortDateString() + " 00:00:00";
            string strDateTo   = this.dtpDateTo.Value.ToShortDateString() + " 23:59:59";

            //this.Cursor = Cursors.WaitCursor;
            DataTable m_dtbOccurRate = new DataTable();

            clsController_SamplesCheckTotal objGermOccurRate = new clsController_SamplesCheckTotal();
            long lngRes = objGermOccurRate.m_lngGetGermOccurRate(out m_dtbOccurRate, strDateFrom, strDateTo);


            if (lngRes > 0 && m_dtbOccurRate != null && m_dtbOccurRate.Rows.Count > 0)
            {
                string strReportPath = @"lis_reports\cryGermOccurRate.rpt";
                m_mthBindDataToReport(m_rdSamplesCheckTotal, strReportPath, m_dtbOccurRate);

                //设置时间域

                this.m_rdSamplesCheckTotal.SetParameterValue(0, strDateFrom.Substring(0, 10));
                this.m_rdSamplesCheckTotal.SetParameterValue(1, strDateTo.Substring(0, 10));

                //显示报表
                this.crvGermOccurRate.ReportSource = m_rdSamplesCheckTotal;
            }
            else
            {
                MessageBox.Show("没有符合条件的记录!");
                return;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 数据初使化

        /// </summary>
        private void InitForm()
        {
            clsController_SamplesCheckTotal objAnimalculeCheckTotal = new clsController_SamplesCheckTotal();
            DataTable dtbSamples = objAnimalculeCheckTotal.m_dtbGetSamplesList();
            DataTable dtbDepts   = objAnimalculeCheckTotal.m_dtbGetDeptList();

            foreach (DataRow row in dtbSamples.Rows)
            {
                clbSamples.Items.Add(row["sample_type_desc_vchr"].ToString());
            }
            foreach (DataRow row in dtbDepts.Rows)
            {
                clbPatientArea.Items.Add(row["DEPTNAME_VCHR"].ToString());
            }

            chkArea.Checked   = true;
            chkSample.Checked = true;
            CheckedAllCheckedBox(clbSamples, CheckState.Checked);
            CheckedAllCheckedBox(clbPatientArea, CheckState.Checked);
            clbSamples.Enabled     = false;
            clbPatientArea.Enabled = false;
        }