Dodano edycje danych osoby - Zmodyfikowano User.cs, DetailedViewModel.cs, DetailedPage.xaml oraz MainPage.xaml
This commit is contained in:
+39
-3
@@ -1,7 +1,43 @@
|
||||
using System.ComponentModel;
|
||||
namespace Navigation_Between.Model;
|
||||
public class User : INotifyPropertyChanged
|
||||
{
|
||||
private string description;
|
||||
private string email;
|
||||
|
||||
public class User {
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
public string Surname { get; set; }
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => description;
|
||||
set
|
||||
{
|
||||
if (description != value)
|
||||
{
|
||||
description = value;
|
||||
OnPropertyChanged(nameof(Description));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Email
|
||||
{
|
||||
get => email;
|
||||
set
|
||||
{
|
||||
if (email != value)
|
||||
{
|
||||
email = value;
|
||||
OnPropertyChanged(nameof(Email));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user