Example #1
0
        /// <summary>
        /// Apila la página indicada en el Stack y envía los parametros
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public static async Task Navegar(PagesKeys page, params object[] parameters)
        {
            switch (page)
            {
            case PagesKeys.DetalleCliente:
                DetalleClienteViewModel.GetInstance().Cliente = (Cliente)parameters[0];
                await IsInstanced(new DetalleClientePage());

                break;

            case PagesKeys.NuevoPedido:
                NuevoPedidoViewModel.GetInstance().Adeudo = (Adeudo)parameters[0];
                await IsInstanced(new NuevoPedidoPage());

                break;

            case PagesKeys.Abono:
                AbonoViewModel.GetInstance().Adeudo = (Adeudo)parameters[0];
                await IsInstanced(new AbonoPage());

                break;

            case PagesKeys.Historial:
                HistorialViewModel.GetInstance().Cliente = (Cliente)parameters[0];
                await IsInstanced(new HistorialPage());

                break;

            default:
                break;
            }
        }
 public DetalleClientePage()
 {
     InitializeComponent();
     BindingContext = DetalleClienteViewModel.GetInstance();
 }
 protected override async void OnAppearing()
 {
     base.OnAppearing();
     await DetalleClienteViewModel.GetInstance().GetData();
 }