コード例 #1
0
        public ActionResult Index()
        {
            ViewBag.homeid = "home";

            EventBL           _evBl            = new EventBL();
            RegistrationBL    _reg             = new RegistrationBL();
            RegistrationModel regmodel         = new RegistrationModel();
            RegistrationModel regmodelCanceled = new RegistrationModel();

            List <EventModel> EventList = new List <EventModel>();

            if (Convert.ToInt32(Session["ROLE_ID"]) == 1)
            {
                if (Session["StarsIdProfile"] != null)
                {
                    if (!_reg.CheckIsSelectBy(Session["StarsIdProfile"].ToString()))
                    {
                        regmodel = _reg.GetRegistrationByStarsId(Session["StarsIdProfile"].ToString());
                    }
                    else
                    {
                        return(RedirectToAction("NoAuthorized", "HttpErrors"));
                    }
                }
                else
                {
                    return(RedirectToAction("Welcome", "LBC"));
                }
            }
            else
            {
                if (Session["StarsIdProfile"] != null)
                {
                    regmodel = _reg.GetRegistrationByStarsId(Session["StarsIdProfile"].ToString());
                }
                else
                {
                    return(RedirectToAction("Welcome", "LBC"));
                }
            }
            ViewBag.lbcCert   = regmodel.LBC_CERT;
            ViewBag.regStatus = regmodel.REGD_STATUS;
            if (regmodel.EVENT_ID != 0)
            {
                ViewBag.eventid    = regmodel.EVENT_ID;
                ViewBag.registered = 1;
            }
            else
            {
                ViewBag.eventid    = 0;
                ViewBag.registered = 0;
            }
            EventList = _evBl.GetAll(Session["StarsIdProfile"].ToString());
            return(View(EventList));
        }
コード例 #2
0
        public ActionResult PhysicalTool()
        {
            RegistrationBL _reg = new RegistrationBL();

            if (Session["StarsIdProfile"] != null)
            {
                ViewBag.IsSelect = false;
                if (_reg.CheckIsSelectBy(Session["StarsIdProfile"].ToString()))
                {
                    ViewBag.IsSelect = true;
                }
                if (Session["CheckId"].ToString() == "1")
                {
                    return(PartialView("_PhysicalTool"));
                }
                if (Session["CheckId"].ToString() == "2")
                {
                    return(PartialView("_PhysicalTool2"));
                }
            }
            return(RedirectToAction("Welcome", "LBC"));
        }