public JsonResult ToggleStatus(UserDTO dto) { int id = dto.UserID; MyDBService ser = new MyDBService(); ser.ToogleStatus(ser.GetUserById(id)); Object obj = new { success = true }; return(Json(obj)); }
public override void OnNavigatedTo(INavigationParameters parameters) { var youtubeur = parameters["youtuber"] as Youtuber; if (youtubeur != null) { SelectedYoutuber = youtubeur; } var refresh = parameters["refresh"]; if (refresh != null) { SelectedYoutuber = MyDBService.SelectYoutubeurById(youtubeur.Id); } }
/* * NAVIGATION */ private void NavigateToPublicProfilePage() { if (ChoiceAdvisedAge != 0 && ChoiceAverageRate != 0 && Choice != null) { UpdateSelectedYoutuber(); MyDBService.UpdateYoutubeur(SelectedYoutuber); var parameter = new NavigationParameters(); parameter.Add("youtuber", SelectedYoutuber); parameter.Add("refresh", true); _navigationService.GoBackAsync(parameter); } else { IsFieldEmpty = true; } }
public ActionResult Dashboard() { if (Session["User"] != null) { MyDBService ser = new MyDBService(); ViewBag.UsersCount = ser.GetUserCount(); ViewBag.UniversityStudentsCount = ser.GetUniversityStudentsCount(); ViewBag.OutsiderStudentsCount = ser.GetOutsiderStudentsCount(); ViewBag.TeachersCount = ser.GetTeachersCount(); ViewBag.DisabledCOunt = ser.GetDisabledCount(); ViewBag.QueriesCount = ser.GetQueriesCount(); ViewBag.UnattendedQueriesCount = ser.GetUnattendedQueriesCount(); return(View()); } else { return(Redirect("~/Users/Login")); } }
public override void OnNavigatedTo(INavigationParameters parameters) { var ayoutubeur = parameters["youtuber"] as List <Youtuber>; var addYoutuber = parameters["new"] as Youtuber; if (ayoutubeur != null) { Youtubers = ayoutubeur; var refreshYoutubers = Youtubers as List <Youtuber>; Youtubers = new List <Youtuber>(); foreach (var youtuber in refreshYoutubers) { Youtubers.Add(youtuber); } MyDBService.AddYoutubeur(addYoutuber); Analytics.TrackEvent("Ajout d'un youtubeur!"); ayoutubeur = null; } }