|
@@ -1,10 +1,44 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using ReactiveUI;
|
|
|
+using YtYtAvalonia.Models;
|
|
|
|
|
|
namespace YtYtAvalonia.ViewModels
|
|
|
{
|
|
|
public class RegistrationViewModel : ReactiveObject
|
|
|
{
|
|
|
- }
|
|
|
+ /*string login = "";
|
|
|
+ string password = "";
|
|
|
+ string surname = "";
|
|
|
+ string name = "";
|
|
|
+ string patronymic = "";
|
|
|
+ int day;
|
|
|
+ int month;
|
|
|
+ int year;
|
|
|
+ string email = "";
|
|
|
+ int phone;
|
|
|
+
|
|
|
+ public string Login { get => login; set => login = value; }
|
|
|
+ public string Password { get => password; set => password = value; }
|
|
|
+ public string Surname { get => surname; set => surname = value; }
|
|
|
+ public string Name { get => name; set => name = value; }
|
|
|
+ public string Patronymic { get => patronymic; set => patronymic = value; }
|
|
|
+ public int Day { get => day; set => day = value; }
|
|
|
+ public int Month { get => month; set => month = value; }
|
|
|
+ public int Year { get => year; set => year = value; }
|
|
|
+ public string Email { get => email; set => email = value; }
|
|
|
+ public int Phone { get => phone; set => phone = value; }*/
|
|
|
+
|
|
|
+ SuharevaContext myConnection;
|
|
|
+ User currentUser;
|
|
|
+ public RegistrationViewModel(SuharevaContext myConnection)
|
|
|
+ {
|
|
|
+ this.myConnection = myConnection;
|
|
|
+ CurrentUser = new User();
|
|
|
+ myConnection.Add(CurrentUser);
|
|
|
+ myConnection.SaveChanges();
|
|
|
+ }
|
|
|
+
|
|
|
+ public User CurrentUser { get => currentUser; set => currentUser = value; }
|
|
|
+ }
|
|
|
}
|