Add clanker code
This commit is contained in:
@@ -29,6 +29,9 @@ namespace dealer
|
||||
// SPZ
|
||||
SpzTextBlock.Text = vehicle.Spz ?? "Nezadano";
|
||||
|
||||
// Znacka
|
||||
ZnackaTextBlock.Text = vehicle.Znacka ?? "Nezadano";
|
||||
|
||||
// Model
|
||||
ModelTextBlock.Text = vehicle.Model ?? "Nezadano";
|
||||
|
||||
@@ -50,6 +53,9 @@ namespace dealer
|
||||
// Rok vyroby
|
||||
YearTextBlock.Text = vehicle.RokVyroby?.ToString() ?? "Nezadano";
|
||||
|
||||
// Palivo
|
||||
PalivoTextBlock.Text = vehicle.Palivo ?? "Nezadano";
|
||||
|
||||
// Najete km
|
||||
if (vehicle.NajeteKm != null)
|
||||
MileageTextBlock.Text = vehicle.NajeteKm.Value.ToString("N0") + " km";
|
||||
@@ -62,12 +68,28 @@ namespace dealer
|
||||
else
|
||||
PriceTextBlock.Text = "Nezadano";
|
||||
|
||||
// Vlastnik
|
||||
if (vehicle.Vlastnik != null)
|
||||
{
|
||||
OwnerNameTextBlock.Text = vehicle.Vlastnik.CeleJmeno;
|
||||
AddressTextBlock.Text = vehicle.Vlastnik.Adresa ?? "Nezadano";
|
||||
PhoneTextBlock.Text = vehicle.Vlastnik.Telefon ?? "Nezadano";
|
||||
EmailTextBlock.Text = vehicle.Vlastnik.Email ?? "Nezadano";
|
||||
}
|
||||
else
|
||||
{
|
||||
OwnerNameTextBlock.Text = "Nezadano";
|
||||
AddressTextBlock.Text = "Nezadano";
|
||||
PhoneTextBlock.Text = "Nezadano";
|
||||
EmailTextBlock.Text = "Nezadano";
|
||||
}
|
||||
|
||||
// Fotografie (base64)
|
||||
if (!string.IsNullOrEmpty(vehicle.Fotografie))
|
||||
if (vehicle.Fotografie != null && !string.IsNullOrEmpty(vehicle.Fotografie.Data))
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] imageBytes = Convert.FromBase64String(vehicle.Fotografie);
|
||||
byte[] imageBytes = Convert.FromBase64String(vehicle.Fotografie.Data);
|
||||
using (var ms = new MemoryStream(imageBytes))
|
||||
{
|
||||
var bitmap = new BitmapImage();
|
||||
@@ -129,3 +151,4 @@ namespace dealer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user