Exemplo n.º 1
0
 public asiView(Person per, ActivitySignin sign)
     : base(per, sign)
 {
 }
        public ActionResult Index(int dwccardnum, int activityID)
        {
            var _asi = new ActivitySignin();
            // Tthe card just swiped
            _asi.dateforsignin = DateTime.Now;
            _asi.activityID = activityID;
            _asi.dwccardnum = dwccardnum;
            //
            //
            Worker w = serv.CreateSignin(_asi, this.User.Identity.Name);
            //Get picture from checkin, show with next view
            Image checkin_image = serv.getImage(dwccardnum);
            string imageRef = "/Content/images/NO-IMAGE-AVAILABLE.jpg";
            if (checkin_image != null)
            {
                imageRef = "/Image/GetImage/" + checkin_image.ID;
            }

            return Json(new
            {
                memberExpired = w.isExpired,
                memberInactive = w.isInactive,
                memberSanctioned = w.isSanctioned,
                memberExpelled = w.isExpelled,
                imageRef = imageRef,
                expirationDate = w.memberexpirationdate
            },
            JsonRequestBehavior.AllowGet);
        }