2025-03-05 09:12:58 +00:00
|
|
|
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<TextBox>("FiO").Text = sotrudnik.Fio;
|
|
|
|
this.FindControl<TextBox>("Position").Text = sotrudnik.TipeEnt;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void SavePosition(object sender, RoutedEventArgs e)
|
|
|
|
{
|
|
|
|
_sotrudnik.TipeEnt = this.FindControl<TextBox>("Position").Text;
|
|
|
|
UpdatedSotrudnik = _sotrudnik;
|
2025-04-22 07:25:24 +00:00
|
|
|
Close(_sotrudnik);
|
2025-03-05 09:12:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void Cancel(object sender, RoutedEventArgs e)
|
|
|
|
{
|
|
|
|
Close();
|
|
|
|
}
|
|
|
|
}
|