123456789101112131415161718192021222324252627282930313233 |
- using System;
- using System.Collections.Generic;
- using Practikaoy.Models;
- using ReactiveUI;
- namespace Practikaoy.ViewModels
- {
- public class AuthPageViewModel : ReactiveObject
- { Sazonova2Context ConnectBD = new Sazonova2Context();
- string _log;
- string _pas;
- int _port;
- public string Loginn
- {
- get => _log; set => _log = value;
- }
- public string Pass
- {
- get => _pas; set => _pas = value;
- }
- public bool PiklsPerson (ref int ex)
- {
- foreach(User item in ConnectBD.Users)
- {
- if (item.Login == Loginn && item.Passs == Pass)
- { ex = item.IdUser;
- return true;
- }
- }
- return false;
- }
- }
- }
|