public void LoadData( ) { DateTime dtPastStart = DateTime.MinValue; DateTime dtPastEnd = DateTime.MinValue; if (Time.StatisticType == FinanceStatisticType.Year) { dtPastStart = Time.StartDate.AddYears(-1); dtPastEnd = Time.EndDate.AddYears(-1); } else if (Time.StatisticType == FinanceStatisticType.Quater) { dtPastStart = Time.StartDate.AddMonths(-3); dtPastEnd = Time.EndDate.AddMonths(-3); } else if (Time.StatisticType == FinanceStatisticType.RangeDate) { dtPastStart = DateTime.MinValue; dtPastEnd = Time.StartDate.AddSeconds(-1); } #region 20 if (DataList.ContainsKey("01")) { DataList["01"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "111", "112" }, new List <string>() { "511", "131", "121", "515" }, Time.StartDate, Time.EndDate, "", true); DataList["01"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "111", "112" }, new List <string>() { "511", "131", "121", "515" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("02")) { DataList["02"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "331" }, new List <string>() { "111", "112", "113", "131", "311" }, Time.StartDate, Time.EndDate, "", true); DataList["02"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "331" }, new List <string>() { "111", "112", "113", "131", "311" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("03")) { DataList["03"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "334" }, new List <string>() { "111", "112" }, Time.StartDate, Time.EndDate, "", true); DataList["03"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "334" }, new List <string>() { "111", "112" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("04")) { DataList["04"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "335", "635", "142", "242" }, new List <string>() { "111", "112", "113", "131" }, Time.StartDate, Time.EndDate, "", true); DataList["04"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "335", "635", "142", "242" }, new List <string>() { "111", "112", "113", "131" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("05")) { DataList["05"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "3334" }, new List <string>() { "111", "112", "113", "131" }, Time.StartDate, Time.EndDate, "", true); DataList["05"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "3334" }, new List <string>() { "111", "112", "113", "131" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("06")) { DataList["06"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "111", "112" }, new List <string>() { "711", "133" }, Time.StartDate, Time.EndDate, "", true); DataList["06"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "111", "112" }, new List <string>() { "711", "133" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("07")) { DataList["07"].Current = AccountingProvider.GetJournalAmount(new List <string>() { "811", "333", "161", "351", "352" }, new List <string>() { "111", "112", "113" }, Time.StartDate, Time.EndDate, "", true); DataList["07"].Past = AccountingProvider.GetJournalAmount(new List <string>() { "811", "333", "161", "351", "352" }, new List <string>() { "111", "112", "113" }, dtPastStart, dtPastEnd, "", true); } if (DataList.ContainsKey("20")) { DataList["20"].Current = DataList["01"].Current + DataList["02"].Current + DataList["03"].Current + DataList["04"].Current + DataList["05"].Current + DataList["06"].Current + DataList["07"].Current; DataList["20"].Past = DataList["01"].Past + DataList["02"].Past + DataList["03"].Past + DataList["04"].Past + DataList["05"].Past + DataList["06"].Past + DataList["07"].Past; } #endregion this.gridControl1.DataSource = BindDataList; this.gridControl1.RefreshDataSource(); }
// GET: Report public ActionResult Index() { var report = AccountingProvider.LoadReport(); return(View(report)); }