public IActionResult FirstPage() { var model = new FirstPageModel(); model.Prediction = _MLService.PredictFromFile(); return(PartialView(model)); }
public async Task <bool> TrainModel() { var model = new FirstPageModel(); await _weatherService.TrainModel(); _MLService.TrainModel(); return(true); }
public void Test_TextInput_Null() { var _dialogSerice = new Mock <IDialogService>(); var _settingsService = new Mock <ISettingsService>(); var firstPageModel = new FirstPageModel(_dialogSerice.Object, _settingsService.Object); firstPageModel.TextInput = null; Assert.IsFalse(firstPageModel.TextInputCheck); }
public async Task <IActionResult> Tables() { try { var res = new FirstPageModel(); res.DistanceByProvinces = await _Da.GetDistanceByProvinceTableData(); res.TypeOfRelevations = await _Da.GetTypeOfRelevationsData(); res.TopTenDevices = await _Da.GetTopTenDevicesData(); res.TopTenByScores = await _Da.GetTopTenByScoresData(); return(View(res)); } catch (Exception) { return(RedirectToAction(nameof(ErrorPage), new ErrorModel { Error = "Non è stato possibile caricare i dati" })); } }
public ActionResult Autorize(string email, string password) { FirstPageModel db = new FirstPageModel(); Persons aut = db.GetUser(email); if (aut == null) { ViewBag.Answer = "No such user. Try again."; return(View("Index")); } if (aut.Password == password) { return(View("MainWindow_cw")); } else { ViewBag.Answer = "Password is incorect"; return(View("Index")); } // id - имя клиента, заказы которого необходимо выводить на странице. // ViewBag.Answer = "No such user. Try again."; }
public AboutPage() { InitializeComponent(); BindingContext = VM = new FirstPageModel(); SetBinding(Shell.NavBarIsVisibleProperty, new Binding(nameof(VM.ShowNavBar))); }