예제 #1
0
        /// <summary>
        /// 准备数据内容
        /// </summary>
        /// <returns></returns>
        private DataTable CreateData()
        {
            if (this.nineCBSmallDept.SelectedItem == null || string.IsNullOrEmpty(this.nineCBSmallDept.SelectedItem.ID))
            {
                MessageBox.Show("请选择需要分析的统计科室。");
                return(null);
            }

            NineVigor.BizLogic.Analysis.FinanceBiz finBiz = new NineVigor.BizLogic.Analysis.FinanceBiz();
            DataTable dt = null;

            int    year          = this.dtBeginDate.Value.Year;
            string conditionType = string.Empty;
            string conditionDept = " and FeeDept='" + this.nineCBSmallDept.SelectedItem.ID + "' ";



            if (rbRecepDept.Checked)
            {
                conditionType = "RD";
            }
            else
            {
                conditionType = "RD";
            }

            if (this.nineCBSmallDept.SelectedItem != null && !string.IsNullOrEmpty(this.nineCBSmallDept.SelectedItem.ID))
            {
                dt = finBiz.GetFeeDeptYearData(conditionDept, "'2013','2014','2015'", "MZ", conditionType);
            }


            return(dt);
        }
예제 #2
0
        /// <summary>
        /// 准备数据内容
        /// </summary>
        /// <returns></returns>
        private DataTable CreateData()
        {
            NineVigor.BizLogic.Analysis.FinanceBiz finBiz = new NineVigor.BizLogic.Analysis.FinanceBiz();
            List <String> condions = new List <string>();

            condions.Clear();
            int beginYear = this.dtBeginDate.Value.Year;
            int endYear   = this.dtEndDate.Value.Year;

            for (int i = beginYear; i <= endYear; i++)
            {
                condions.Add(i.ToString());
            }

            DataTable dt = finBiz.GetRegYearData(condions);

            return(dt);
        }
예제 #3
0
        /// <summary>
        /// 准备数据内容
        /// </summary>
        /// <returns></returns>
        private DataTable CreateData()
        {
            if (this.nineCBSmallDept.SelectedItem == null || string.IsNullOrEmpty(this.nineCBSmallDept.SelectedItem.ID))
            {
                MessageBox.Show("请选择需要分析的统计科室。");
                return(null);
            }

            NineVigor.BizLogic.Analysis.FinanceBiz finBiz = new NineVigor.BizLogic.Analysis.FinanceBiz();
            DataTable dt = null;

            int year    = this.dtBeginDate.Value.Year;
            int weekNum = NineVigor.FrameWork.Common.CommonBiz.GetWeekOfYear(this.dtBeginDate.Value);


            dt = finBiz.GetInMainFeeData("ALL", this.dtBeginDate.Value.ToString("yyyy-MM-dd"), this.dtEnd.Value.ToString("yyyy-MM-dd"));

            return(dt);
        }
예제 #4
0
        /// <summary>
        /// 准备数据内容
        /// </summary>
        /// <returns></returns>
        private DataTable CreateData()
        {
            if (this.nineCBSmallDept.SelectedItem == null || string.IsNullOrEmpty(this.nineCBSmallDept.SelectedItem.ID))
            {
                MessageBox.Show("请选择需要分析的统计科室。");
                return(null);
            }

            NineVigor.BizLogic.Analysis.FinanceBiz finBiz = new NineVigor.BizLogic.Analysis.FinanceBiz();
            DataTable dt = null;

            int year    = this.dtBeginDate.Value.Year;
            int weekNum = NineVigor.FrameWork.Common.CommonBiz.GetWeekOfYear(this.dtBeginDate.Value);

            int begWeekNum = 0;

            if (this.rbCurCheck.Checked)
            {
                if (string.IsNullOrEmpty(nvTextEdit1.Text.Trim()))
                {
                    MessageBox.Show("请填写需要对比分析的周数。");
                    nvTextEdit1.Focus();
                    return(null);
                }
                int numZQ = 0;
                int.TryParse(nvTextEdit1.Text, out numZQ);
                if (weekNum - numZQ > 0)
                {
                    begWeekNum = weekNum - numZQ;
                    weekNum    = weekNum + 1;
                }
                else
                {
                    begWeekNum = 0;
                    weekNum    = weekNum + 1;
                }
            }
            else if (rbBeforeCheck.Checked)
            {
                condions.Clear();
                if (string.IsNullOrEmpty(nvTextEdit2.Text.Trim()))
                {
                    MessageBox.Show("请填写往期年度数。");
                    nvTextEdit2.Focus();
                    return(null);
                }

                DateTime dtNow = this.dtBeginDate.Value;
                try
                {
                    int yearNum = 0;
                    int.TryParse(nvTextEdit2.Text, out yearNum);


                    for (int i = 0; i <= yearNum; i++)
                    {
                        condions.Add(dtNow.AddYears(0 - i).Year.ToString());
                    }
                }
                catch
                {
                    condions.Add(dtNow.Year.ToString());
                }
            }

            if (this.rbCurCheck.Checked)
            {
                if (this.nineCBSmallDept.SelectedItem != null && !string.IsNullOrEmpty(this.nineCBSmallDept.SelectedItem.ID))
                {
                    dt = finBiz.GetRegDeptWeekData(this.nineCBSmallDept.SelectedItem.ID, year, begWeekNum, weekNum);
                }
            }
            else if (this.rbBeforeCheck.Checked)
            {
                if (this.nineCBSmallDept.SelectedItem != null && !string.IsNullOrEmpty(this.nineCBSmallDept.SelectedItem.ID))
                {
                    dt = finBiz.GetRegDeptWeekBeforeData(this.nineCBSmallDept.SelectedItem.ID, condions, weekNum);
                }
            }
            return(dt);
        }