demo4/demo4_true/ModelsMy/ClientAuth.cs
2025-01-28 19:06:43 +03:00

30 lines
692 B
C#

using System;
using System.IO;
using Avalonia.Media.Imaging;
using demo4_true.Models;
namespace demo4_true.ModelsMy;
public class ClientAuth: Client
{
public int Id { get; set; }
public string Password { get; set; } = null!;
public int Role { get; set; }
public string FIO { get; set; } = null!;
public string PhotoPath { get; set; } = null!;
public Bitmap? Image
{
get
{
try
{
string absolutePath = Path.Combine(AppContext.BaseDirectory, PhotoPath);
return new Bitmap(absolutePath);
}
catch
{
return null;
}
}
}
}