12345678910111213141516171819202122232425262728293031323334 |
- 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;
- }
- }
- }
|