public void SaveButton() { if (LoggedUser.Instance.IsManager()) { this.taskToEdit.Name = this.NameTextBox; this.taskToEdit.Description = this.DescriptionTextBox; var helper = new InfoHelper(); helper.EditTask(this.taskToEdit); Show.SuccesBox("Pomyslnie edytowano zadanie."); this.TryCloseAsync(); } else { Show.ErrorBox("Nie masz uprawnień do edytowania zadań!"); } }