Beispiel #1
0
        private async void LoadGDChi()
        {
            var business = new BusGiaoDich();
            var listChi  = await business.LoadGiaoDichByLoaiGD(_idChi);

            if (listChi.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 chi trong sổ thu chi"
                };
                ChiPanel.Children.Add(status);
            }
            else
            {
                ChiPanel.Children.Clear();
                foreach (var giaoDich in listChi)
                {
                    var giaoDichItem = new ViewData(giaoDich);
                    ChiPanel.Children.Add(giaoDichItem);
                }
            }
        }
Beispiel #2
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);
                }
            }
        }
Beispiel #3
0
        private void Delete(int ID)
        {
            var bus = new BusGiaoDich();

            bus.DeleteGiaoDichByID(ID);
            LoadGDChi();
            LoadGDThu();
        }