public IActionResult Room(long id, int tZOS, int lang) { LoginModel model = base.TutorModel != null ? base.TutorModel : base.StudentModel; if (model != null) { DataList <Event> events = ScheduleDB.Room(id, tZOS, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (events.Data.Count > 0) { IEnumerator <Event> enumerator = events.Data.GetEnumerator(); enumerator.MoveNext(); if (enumerator.Current.Running && enumerator.Current.Joined.Contains(model.User.UserId)) { string jsFunction = "warn(\"You are alrady in room! If you feel anything wrong please login again.\");"; TempData["JavaScriptFunction"] = jsFunction; return(RedirectToAction("Index", "Home")); } ViewBag.Event = enumerator.Current; } return(View(model)); } return(base.AssureLogin(this.CurrentController, this.CurrentAction)); }
public IActionResult RoomInf(long id, int tZOS, int lang = 1) { return(Json(ScheduleDB.Room(id, tZOS, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)))); }