45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Avalonia.Markup.Xaml;
|
|
using demo_blagodat.Models;
|
|
using System;
|
|
|
|
namespace demo_blagodat;
|
|
|
|
public partial class Registration : Window
|
|
{
|
|
private string _labelText;
|
|
public Registration()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
//private void RegisterClick_OnClick(object? sender, RoutedEventArgs e)
|
|
//{
|
|
// if (string.IsNullOrEmpty(LoginTextBox.Text)) return;
|
|
// if (string.IsNullOrEmpty(PasswordTextBox.Text)) return;
|
|
// using var dbContext = new User11Context();
|
|
// var user = new Client
|
|
// {
|
|
// ClientCode = ,
|
|
// ClientName = LoginTextBox.Text,
|
|
// ClientPassword = PasswordTextBox.Text,
|
|
// ClientBirthday = DateBirthday.DatePicker,
|
|
// ClientAddress = AddressTextBox.Text,
|
|
// ClientEmail = ,
|
|
// ClientPassword =
|
|
// };
|
|
// dbContext.Clients.Add(user);
|
|
// if (dbContext.SaveChanges() > 0)
|
|
// {
|
|
// new MainWindow().Show();
|
|
// Close();
|
|
// }
|
|
//}
|
|
private void RegisterClick_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
new MainWindow().Show();
|
|
Close();
|
|
}
|
|
}
|