예제 #1
0
        async void NavigateTo(Shared.Services.Table.REKENING_STAND stand)
        {
            try
            {
                MessagingCenter.Send <ParamPasser> (new ParamPasser()
                {
                    DateParameter = DateTime.Now
                }, "Timer");
                if (contSelectedStand.Exists(x => x.nostand == stand.nostand))
                {
                    Shared.Settings.Panels.Alert.Display("Tidak dapat menambahkan stand yang sudah ditandai", "Gagal Menambahkan", "OK");
                }
                else
                {
                    contSelectedStand.Add(new Shared.Services.Table.REKENING_STAND {
                        alamat  = stand.alamat,
                        nmped   = stand.nmped,
                        nostand = stand.nostand,
                        pasar   = stand.pasar,
                    });
                    txtSelectedItem.Text = contSelectedStand.Count.ToString();

                    if (contSelectedStand.Count >= 1)
                    {
                        btnLanjutLayout.IsVisible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                Shared.Services.Logs.Insights.Send("NavigateTo", ex);
                //throw ex;
            }
        }
예제 #2
0
        async void NavigateTo(Shared.Services.Table.REKENING_STAND stand)
        {
            try
            {
                MessagingCenter.Send <ParamPasser> (new ParamPasser()
                {
                    DateParameter = DateTime.Now
                }, "Timer");
                var answer = await Shared.Settings.Panels.Alert.Display("Hapus stand ini?", "Hapus", "Ya", "Tidak");

                if (answer == true)
                {
                    if (removeSelection(stand.nostand) == true)
                    {
                        listSelectedRekStand.RemoveAll(x => x.nostand == stand.nostand);
                    }
                    StandSearchResultLV.ItemsSource = null;
                    StandSearchResultLV.ItemsSource = listSelectedRekStand;
                    counter.Text = listSelectedRekStand.Count.ToString();
                    MessagingCenter.Send <ParamPasser> (new ParamPasser()
                    {
                        Stands = listSelectedRekStand
                    }, "CheckRow");
                }
            }
            catch (Exception ex)
            {
                Shared.Services.Logs.Insights.Send("NavigateTo", ex);
            }
        }