public ActionResult RewardEarn(string event_no) { if (Session["acc"] == null) { return(View("../Control/index")); } Models.ControlUser ctlUser = (Models.ControlUser)Session["acc"]; ViewBag.ACCOUNT = ctlUser.Account; ViewBag.ADMIN = ctlUser.IsAdmin; THC_Library.Error error; Models.MyEvent myEvent = new Models.MyEvent(); DataTable eventsTable = myEvent.getMyEventList(out error); if (error != null) { ViewBag.Error = error.ErrorMessage; return(View("Error")); } else { var lanSet = new THC_Library.Language.LanguageBase(); lanSet.CurrentZone = THC_Library.Language.LanguageBase.CURRENT_LANGUAGE; ViewData["lan"] = lanSet; ViewBag.Data = eventsTable; return(View("RewardEarnList")); } }
public ActionResult EnterControl() { THC_Library.Error error; string strAccount = Request.Form["user"]; string strPwd = Request.Form["pass"]; if (string.IsNullOrEmpty(strAccount)) { ViewBag.ERROR_MESSAGE = "請輸入帳號"; return(View("Index")); } if (string.IsNullOrEmpty(strPwd)) { ViewBag.ERROR_MESSAGE = "請輸入密碼"; return(View("Index")); } Models.SystemControl systemCtl = new Models.SystemControl(); System.Data.DataTable userTable = systemCtl.enterVerify(strAccount, strPwd, out error); if (error != null) { ViewBag.ORG_ACCOUNT = strAccount; ViewBag.ERROR_MESSAGE = error.ErrorMessage; return(View("Index")); } else { Session["acc"] = strAccount; ViewBag.ACCOUNT = Session["acc"].ToString(); var lanSet = new THC_Library.Language.LanguageBase(); lanSet.CurrentZone = THC_Library.Language.LanguageBase.CURRENT_LANGUAGE; ViewData["lan"] = lanSet; if (userTable == null) { //Models.MyEvent myEvent = new Models.MyEvent(); //System.Data.DataTable eventsTable = myEvent.getMyEventList(out error); if (error != null) { ViewBag.Error = error.ErrorMessage; return(View("../Backend/Error")); } else { //ViewBag.Data = eventsTable; return(View("../Backend/EventActivities")); } } else { ViewBag.ADMIN = true; return(View("Preview", userTable)); } } }
public ActionResult UserControl() { if (Session["acc"] == null) { return(View("index")); } var lanSet = new THC_Library.Language.LanguageBase(); lanSet.CurrentZone = THC_Library.Language.LanguageBase.CURRENT_LANGUAGE; ViewData["lan"] = lanSet; Models.ControlUser ctlUser = (Models.ControlUser)Session["acc"]; ViewBag.ACCOUNT = ctlUser.Account; ViewBag.ADMIN = ctlUser.IsAdmin; return(View()); }