Exemplo n.º 1
0
 private async void LoadGDVay()
 {
     var business = new BusGiaoDich();
     var listVay = await business.LoadGiaoDichByLoaiGD(_idVay);
     if (listVay.Count == 0)
     {
         var status = new TextBlock()
         {
             FontSize = 30,
             FontStyle = FontStyle.Italic,
             Foreground = new SolidColorBrush(Colors.DimGray),
             TextWrapping = TextWrapping.Wrap,
             Text = "Hiện chưa có giao dịch nào trong sổ vay nợ"
         };
         VayPanel.Children.Add(status);
     }
     else
     {
         VayPanel.Children.Clear();
         foreach (var giaoDich in listVay)
         {
             var giaoDichItem = new ViewData(giaoDich) { Margin = new Thickness(10) };
             VayPanel.Children.Add(giaoDichItem);
         }
     }
 }
Exemplo n.º 2
0
 private async void LoadGDThu()
 {
     var business = new BusGiaoDich();
     var listThu = await business.LoadGiaoDichByLoaiGD(_idThu);
     if (listThu.Count == 0)
     {
         var status = new TextBlock()
         {
             FontSize = 30,
             FontStyle = FontStyle.Italic,
             Foreground = new SolidColorBrush(Colors.DimGray),
             TextWrapping = TextWrapping.Wrap,
             Text = "Hiện chưa có giao dịch thu trong sổ thu chi"
         };
         ThuPanel.Children.Add(status);
     }
     else
     {
         ThuPanel.Children.Clear();
         foreach (var giaoDich in listThu)
         {
             var giaoDichItem = new ViewData(giaoDich);
             giaoDichItem.delete += Delete;
             ThuPanel.Children.Add(giaoDichItem);
         }
     }
 }