Example #1
0
        // 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());
        }
Example #2
0
        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);
        }