Esempio n. 1
0
        public static void GetZCKB(int UserID, out DateTime StartTime, out DateTime EndTime, out string Title)
        {
            StartTime = GetWeekFirstDayMon(DateTime.Today);
            EndTime   = StartTime.AddDays(8);
            Title     = "本周支出";
            AnalysisSummary analysisSummary = AnalysisSummary.GetAnalysisSummaryByCode(UserID, "zckb");

            if (analysisSummary == null)
            {
                return;
            }
            Title = analysisSummary.AnalysisName + "支出";
            switch (analysisSummary.AnalysisCode)
            {
            case "zckb_bz":
                break;

            case "zckb_byd":
            {
                StartTime = DateTime.Today.AddDays(1 - DateTime.Today.Day);
                string _endtime = (StartTime.AddMonths(1).AddDays(-1)).ToString("yyyy-MM-dd") + " 23:59:59";
                EndTime = Convert.ToDateTime(_endtime);
            }
            break;

            case "zckb_bjd":
            {
                StartTime = DateTime.Today.AddMonths(0 - ((DateTime.Today.Month - 1) % 3)).AddDays(1 - DateTime.Today.Day);
                string _endtime = (StartTime.AddMonths(3).AddDays(-1)).ToString("yyyy-MM-dd") + " 23:59:59";
                EndTime = Convert.ToDateTime(_endtime);
            }
            break;

            case "zckb_bnd":
            {
                StartTime = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
                string _endtime = (DateTime.Parse(DateTime.Now.ToString("yyyy-12-31"))).ToString("yyyy-MM-dd") + " 23:59:59";
                EndTime = Convert.ToDateTime(_endtime);
            }
            break;

            case "zckb_lslj":
            {
                StartTime = DateTime.MinValue;
                EndTime   = DateTime.MinValue;
            }
            break;

            default:
                break;
            }
        }
Esempio n. 2
0
        public static bool GetQFHS(int UserID, out DateTime StartTime, out DateTime EndTime, out string Title)
        {
            StartTime = DateTime.MinValue;
            EndTime   = DateTime.MinValue;
            Title     = "欠费户数";
            AnalysisSummary analysisSummary = AnalysisSummary.GetAnalysisSummaryByCode(UserID, "ljqf");

            if (analysisSummary == null)
            {
                return(false);
            }
            GetQK(UserID, out StartTime, out EndTime, out Title);
            Title = "欠费户数";
            return(true);
        }
Esempio n. 3
0
        public static void GetQK(int UserID, out DateTime StartTime, out DateTime EndTime, out string Title)
        {
            StartTime = DateTime.MinValue;
            EndTime   = DateTime.MinValue;
            Title     = "累计欠款";
            AnalysisSummary analysisSummary = AnalysisSummary.GetAnalysisSummaryByCode(UserID, "ljqf");

            if (analysisSummary == null)
            {
                return;
            }
            Title = analysisSummary.AnalysisName + "欠款";
            switch (analysisSummary.AnalysisCode)
            {
            case "ljqf_jzjr":
                StartTime = DateTime.MinValue;
                EndTime   = DateTime.Today;
                break;

            case "ljqf_byd":
            {
                StartTime = DateTime.Today.AddDays(1 - DateTime.Today.Day);
                string _endtime = (StartTime.AddMonths(1).AddDays(-1)).ToString("yyyy-MM-dd") + " 23:59:59";
                EndTime = Convert.ToDateTime(_endtime);
            }
            break;

            case "ljqf_bnd":
            {
                StartTime = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
                string _endtime = (DateTime.Parse(DateTime.Now.ToString("yyyy-12-31"))).ToString("yyyy-MM-dd") + " 23:59:59";
                EndTime = Convert.ToDateTime(_endtime);
            }
            break;

            case "ljqf_lslj":
            {
                StartTime = DateTime.MinValue;
                string _endtime = (DateTime.Parse(DateTime.Now.ToString("yyyy-01-01")).AddDays(-1)).ToString("yyyy-MM-dd") + " 23:59:59";
                EndTime = Convert.ToDateTime(_endtime);
            }
            break;

            default:
                break;
            }
        }