AddEmployeesViewModel.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using Acosta.Models;
  4. using Acosta.Views;
  5. using ReactiveUI;
  6. namespace Acosta.ViewModels
  7. {
  8. public class AddEmployeesViewModel : ReactiveObject
  9. {
  10. SuharevaContext myConnection;
  11. Employee currentUser;
  12. /* string f;
  13. string i;
  14. string o;
  15. string phone;
  16. string email;
  17. int role;
  18. string password;*/
  19. public AddEmployeesViewModel(SuharevaContext myConnection)
  20. {
  21. this.myConnection = myConnection;
  22. CurrentUser = new Employee();
  23. /* CurrentUser.Surname = F;
  24. CurrentUser.Name = I;
  25. CurrentUser.Patronymic = O;
  26. CurrentUser.Phonenumber = Phone;
  27. CurrentUser.Email = Email;
  28. CurrentUser.Password = Password;
  29. CurrentUser.Role = Role;*/
  30. myConnection.Add(currentUser);
  31. }
  32. public Employee CurrentUser { get => currentUser; set => currentUser = value; }
  33. /*public string Phone { get => phone; set => phone = value; }
  34. public string Email { get => email; set => email = value; }
  35. public int Role { get => role; set => role = value; }
  36. public string Password { get => password; set => password = value; }
  37. public string F { get => f; set => f = value; }
  38. public string I { get => i; set => i = value; }
  39. public string O { get => o; set => o = value; }*/
  40. }
  41. }