// GET: Callendar public ActionResult Home() { WebCalService cal = new WebCalService(); var tmpLog = User.Identity.Name.ToString(); if (firsTime) { callendar = cal.Calendar(tmpLog, DateTime.Now.Year, DateTime.Now.Month); firsTime = false; } ViewBag.mod = callendar; return(View()); }
public JsonResult Home(int month, int year) { var tmpLog = User.Identity.Name.ToString(); // ModelState.Clear(); ViewBag.mod = null; WebCalService cal = new WebCalService(); var calendar = cal.Calendar(tmpLog, year, month); ViewBag.mod = callendar; // RedirectToAction("Home"); return(new JsonResult { Data = calendar }); //return View(); //Json(string.Empty, JsonRequestBehavior.AllowGet); }