Esempio n. 1
0
        public async void ver_nCorte()
        {
            Get_ID     ids      = new Get_ID();
            int        g        = 0;
            int        id_corte = ids.get_corte();
            Get_NCorte n        = new Get_NCorte();

            g = await n.get_ncorte();

            await App.Current.MainPage.DisplayAlert("Advertencia", "Numero De Turno Actual: " + g.ToString(), "ok");

            await App.Current.MainPage.DisplayAlert("Advertencia", "ID del Corte Actual: " + id_corte.ToString(), "ok");
        }
Esempio n. 2
0
        // Ingresar Corte Al Sistema
        public async void Iniciar_Corte()
        {
            CorteModel datos   = new CorteModel();
            Get_ID     ids     = new Get_ID();
            Get_NCorte num     = new Get_NCorte();
            int        n_corte = await num.get_ncorte();

            int    id_usuario  = ids.get_usuario();
            int    id_sucursal = ids.get_sucursal();
            string nombre      = ids.get_nombreusuario();
            //await App.Current.MainPage.DisplayAlert("Corte","ID Usuario: " + id_usuario.ToString()+ "\n"+ "ID Sucursal: " + id_sucursal.ToString() + "\n" + "Nombre: " + nombre , "OK");
            var corte_save = await bdapi.Iniciar_Corte(new CorteModel {
                usuario          = id_usuario,
                sucursal         = id_sucursal,
                efectivo_final   = 0.00,
                efectivo_inicial = 0.00,
                // Estado 1 Para indicar que se inicio
                estado = 1,
                turno  = n_corte + 1
            });

            corte = new ObservableCollection <CorteModel>(corte_save);
            foreach (CorteModel info in corte)
            {
                datos.id_corte         = info.id_corte;
                datos.fecha_hora       = info.fecha_hora;
                datos.efectivo_final   = info.efectivo_final;
                datos.efectivo_inicial = info.efectivo_inicial;
                datos.estado           = info.estado;
                datos.sucursal         = info.sucursal;
                datos.usuario          = info.usuario;
                datos.turno            = info.turno;
            }
            bdlocal.CreateCorte(datos);
            //int num_corte = await num.get_ncorte();
            //await App.Current.MainPage.DisplayAlert("Corte","Numero De Turno: " + num_corte, "OK");
        }