34 lines
1015 B
C#
34 lines
1015 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Demka_Snova_1.Hardik.Conect.Dao;
|
|
using System;
|
|
|
|
namespace Demka_Snova_1.OknaFunciy
|
|
{
|
|
public partial class AddClientWindow : Window
|
|
{
|
|
public AddClientWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void SaveButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var client = new KlientDao
|
|
{
|
|
Fio = this.FindControl<TextBox>("FioTextBox").Text,
|
|
Email = this.FindControl<TextBox>("EmailTextBox").Text,
|
|
Adres = this.FindControl<TextBox>("AddressTextBox").Text,
|
|
Birth_Day = (this.FindControl<DatePicker>("BirthDatePicker").SelectedDate?.DateTime ?? DateTime.Now),
|
|
Passport = this.FindControl<TextBox>("PassportTextBox").Text
|
|
};
|
|
|
|
Close(client);
|
|
}
|
|
|
|
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
Close(null);
|
|
}
|
|
}
|
|
} |