Exemple #1
0
        public ActionResult ShowCalendarDetail(string id)
        {
            if (!Utitl.CheckUser(db, User.Identity.Name, "CheckIn", 0))
            {
                return(RedirectToAction("relogin", "home"));
            }

            var calendar = db.CalendarInfoes.Find(id);
            var detail   = db.checkin_getcalendar(calendar.CMonth, calendar.CYear, calendar.StaffId).OrderBy(p => p.CDay).ToList();

            ViewBag.GroupType = db.checkin_calendartype_group(calendar.CMonth, calendar.CYear, calendar.StaffId).ToList();
            ViewBag.Calendar  = calendar;

            ViewBag.AgencyReport = db.checkin_count_day_agency(calendar.CMonth, calendar.CYear, calendar.StaffId).OrderBy(p => p.AgencyCode).ToList();

            return(View(detail));
        }