update message list page

pull/69/head
Antoine PEREDERII 2 years ago
parent 8ad11591b5
commit 20c7b3000a

@ -11,13 +11,6 @@ public partial class BalancePage : ContentPage
{
InitializeComponent();
BindingContext = Mgr.SelectedAccount;
if(Mgr.IsConsultant == true)
{
//Label lext = new Label { Text = "Hello" };
//Grid.Add(lext);
Image backArrow = new Image { Source = "{StaticResource AccountIcon}", HeightRequest = 100 };
Grid.Add(backArrow);
}
}
public async void Balance_Clicked(object sender, EventArgs e)

@ -23,27 +23,5 @@ public partial class BalanceView : ContentView
Mgr.SelectedTransaction = selectedItem;
await Navigation.PushModalAsync(new TransactionsPage());
}
//if (string.IsNullOrWhiteSpace(idLabel.Text))
//{
// //await DisplayAlert("Erreur", "Aucune transaction présente", "OK");
// Debug.WriteLine("Erreur1");
// return;
//}
//Transaction transaction = Mgr.SelectedAccount.TransactionsList.FirstOrDefault(u => u.Id == TransactionId);
//if (transaction == null)
//{
// Debug.WriteLine("Erreur2");
// //await DisplayAlert("Erreur", "La transaction n'éxiste pas !", "OK");
// return;
//}
//Mgr.SelectedTransaction = transaction;
//Mgr.SelectedTransaction = Mgr.CustomersList[0].AccountsList[0].TransactionsList[0];
//await Navigation.PushModalAsync(new TransactionsPage());
}
}

@ -7,26 +7,29 @@
<VerticalStackLayout>
<!--<Label
Text="rzklpkrz,e"
Grid.Column="1"
VerticalOptions="Center"
Margin="10, 0, 0, 0"
BackgroundColor="Red"/>-->
<Label Text="{Binding Consultant.MessagesList[0].Subject}" />
<ListView ItemsSource="{Binding Consultant.MessagesList}"
SelectionMode="None"
BackgroundColor="Red"
RowHeight="50">
RowHeight="100">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Subject}" />
<ViewCell>
<!--Limiter le subject à un nombre de caractère -->
<Grid RowDefinitions="auto, auto">
<Label
Text="{Binding Subject}"
FontSize="Title"
Padding="10"/>
<Label
Text="{Binding Description}"
Grid.Row="1"/>
</Grid>
</ViewCell>
</DataTemplate>

@ -17,7 +17,7 @@ namespace Model
/// Liste des messages du consultant.
/// </summary>
[DataMember]
public List<Message> MessagesList = new List<Message>();
public List<Message> MessagesList { get; } = new ();
/// <summary>
/// Constructeur de la classe Consultant.

Loading…
Cancel
Save