markus / MarkusLogview / MARKUS_LOGVIEW / Controllers / DashboardController.cs @ 84578b97
이력 | 보기 | 이력해설 | 다운로드 (851 Bytes)
1 | 84578b97 | djkim | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Web; |
||
5 | using System.Web.Mvc; |
||
6 | |||
7 | namespace MARKUS_LOGVIEW.Controllers |
||
8 | { |
||
9 | public class DashboardController : Controller |
||
10 | { |
||
11 | // GET: Dashboard |
||
12 | public ActionResult Index() |
||
13 | { |
||
14 | |||
15 | if (Session["accessToken"] != null) |
||
16 | { |
||
17 | string first = DateTime.Now.Year.ToString() + "-" + (DateTime.Now.Month == 1 ? "01" : DateTime.Now.AddMonths(-1).Month.ToString("00")); |
||
18 | string last = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString("00"); |
||
19 | |||
20 | ViewBag.FirstDate = first; |
||
21 | ViewBag.LastDate = last; |
||
22 | |||
23 | return View(); |
||
24 | |||
25 | } |
||
26 | else |
||
27 | { |
||
28 | return Redirect("/Login/Index"); |
||
29 | } |
||
30 | |||
31 | } |
||
32 | } |
||
33 | } |