|
@@ -8,39 +8,46 @@ namespace Practikaoy.ViewModels
|
|
|
{
|
|
|
public class MainWindowViewModel : ViewModelBase
|
|
|
{
|
|
|
+
|
|
|
Sazonova2Context ConnectBD = new Sazonova2Context();
|
|
|
AuthPageViewModel _authPage = new AuthPageViewModel();
|
|
|
- MeRoomViewModel _meRoom = new MeRoomViewModel(1);
|
|
|
+
|
|
|
UserControl canic = new AuthPas();
|
|
|
public UserControl Canic
|
|
|
{
|
|
|
get => canic;
|
|
|
set => this.RaiseAndSetIfChanged(ref canic, value);
|
|
|
- }
|
|
|
- // UserControl _uthP = new MeRoomViewModel();
|
|
|
+ }
|
|
|
+ MeRoomViewModel _meRoom = new MeRoomViewModel(1);
|
|
|
+ UserControl _root = new MeRoom();
|
|
|
+
|
|
|
public MeRoomViewModel MeRoom { get => _meRoom; set => _meRoom = value; }
|
|
|
public AuthPageViewModel AuthPage { get => _authPage; set => _authPage = value; }
|
|
|
public UserControl USE { get => canic; set => this.RaiseAndSetIfChanged(ref canic, value); }
|
|
|
|
|
|
- public void NextPage()
|
|
|
+ public void NaxtPage()
|
|
|
+ {
|
|
|
+ USE = new MeRoom();
|
|
|
+ }
|
|
|
+ public void PsssNext()
|
|
|
{
|
|
|
- int ex = 0;
|
|
|
- if (AuthPage.PiklsPerson(ref ex))
|
|
|
+ int id = 0;
|
|
|
+ if (AuthPage.PiklsPerson(ref id))
|
|
|
{
|
|
|
- _meRoom = new MeRoomViewModel(ex);
|
|
|
+ _meRoom = new MeRoomViewModel(id);
|
|
|
USE = new MeRoom();
|
|
|
}
|
|
|
- else { USE = new AuthPas(); }
|
|
|
+ else
|
|
|
+ USE = new MeRoom();
|
|
|
}
|
|
|
- public void PreviousPage()
|
|
|
- {
|
|
|
- MeRoom.IsEnableEdit = true;
|
|
|
+ public void EndintRoom()
|
|
|
+ {
|
|
|
+ MeRoom.UserisChanged = true;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|
|
|
}
|