using Avalonia.Controls; using Avalonia.Interactivity; using Demka_Snova_1.Hardik.Conect.Dao; namespace Demka_Snova_1.OknaFunciy; public partial class ChangeRoleWindow : Window { public SotrudnikDao UpdatedSotrudnik { get; private set; } private SotrudnikDao _sotrudnik; public ChangeRoleWindow(SotrudnikDao sotrudnik) { InitializeComponent(); _sotrudnik = sotrudnik; this.FindControl("FiO").Text = sotrudnik.Fio; this.FindControl("Position").Text = sotrudnik.TipeEnt; } private void SavePosition(object sender, RoutedEventArgs e) { _sotrudnik.TipeEnt = this.FindControl("Position").Text; UpdatedSotrudnik = _sotrudnik; Close(); } private void Cancel(object sender, RoutedEventArgs e) { Close(); } }