Exemplo n.º 1
0
        private void RutaDetail()
        {
            var rutaIntemViewModel = new RutasItemViewModel {
                Nombre      = Nombre,
                IdRuta      = IdRuta,
                Descripcion = Descripcion,
                CodBodega   = CodBodega,
            };
            var codigoViewModel = new CodigoViewModel {
                Ruta            = Nombre,
                DescripcionRuta = Descripcion,
                Code            = "",
                IdAsignRuta     = IdRuta.ToString(),
            };

            var tempinvent = new TempInvent
            {
                IdAsignRuta     = IdRuta,
                Code            = "",
                Ruta            = Nombre,
                DescripcionRuta = Descripcion,
                Cant            = "",
            };
            var ruta          = dataService.InsertTempinv(tempinvent);
            var mainViewModel = MainViewModel.GetInstance();

            mainViewModel.SetCurrentCode(codigoViewModel);
            mainViewModel.SetCurrentRuta(rutaIntemViewModel);
            navigationService.Navigate("IngresoProducto");
        }
Exemplo n.º 2
0
        public async void Scanner(string codigo)
        {
            Code = codigo;

            var Detailcod = await wSLservice.GetProdDetail(Code);

            if (Detailcod.IsSuccess)
            {
                TempInvent tempInvent = dataService.GetTempInvent();
                var        codigoView = new CodigoViewModel
                {
                    Codigo          = Detailcod.Codigo,
                    Detalle         = Detailcod.Detalle,
                    UnidadMed       = Detailcod.UnidadMed,
                    Ruta            = tempInvent.Ruta,
                    DescripcionRuta = tempInvent.DescripcionRuta,
                    IdAsignRuta     = tempInvent.IdAsignRuta.ToString(),
                };
                var mainViewModel = MainViewModel.GetInstance();
                mainViewModel.SetCurrentCode(codigoView);
                navigationService = new NavigationService();

                navigationService.Navigate("IngProdInventario");
            }
            else
            {
                await dialogService.Showmessage("Error", Detailcod.Messagge);
            }
        }
Exemplo n.º 3
0
 public Response InsertTempinv(TempInvent tempInvent)
 {
     try
     {
         using (var da = new DataAccess())
         {
             var oldtemp = da.First <TempInvent>(false);
             if (oldtemp != null)
             {
                 da.Delete(oldtemp);
             }
             da.Insert(tempInvent);
         }
         return(new Response
         {
             IsSuccess = true,
             Messagge = "Usuario Insertado OK,",
             Result = tempInvent,
         });
     }
     catch (Exception ex)
     {
         return(new Response
         {
             IsSuccess = false,
             Messagge = ex.Message,
         });
     }
 }
Exemplo n.º 4
0
        private async void IngresarInv()
        {
            LoginResult user       = dataService.GetUser();
            var         IngConfirm = await wSLservice.IngProdInvConfirm(IdAsignRuta, user.UserId.ToString(), Codigo, Cant, UnidadMed);

            if (IngConfirm.IsSuccess)
            {
            }
            else
            {
                await dialogService.Showmessage("Error", IngConfirm.Messagge);
            }
            TempInvent tempInvent = dataService.GetTempInvent();
            var        codigoView = new CodigoViewModel
            {
                Codigo          = "",
                Detalle         = "",
                UnidadMed       = "",
                Ruta            = tempInvent.Ruta,
                DescripcionRuta = tempInvent.DescripcionRuta,
                IdAsignRuta     = tempInvent.IdAsignRuta.ToString(),
            };
            var mainViewModel = MainViewModel.GetInstance();

            mainViewModel.SetCurrentCode(codigoView);

            navigationService = new NavigationService();

            navigationService.Navigate("IngresoProducto");
        }
Exemplo n.º 5
0
 public Response UpdateTempInvent(TempInvent tempInvent)
 {
     try
     {
         using (var da3 = new DataAccess())
         {
             da3.Update(tempInvent);
         }
         return(new Response
         {
             IsSuccess = true,
             Messagge = "Usuario Actualizado OK,",
             Result = tempInvent,
         });
     }
     catch (Exception ex)
     {
         return(new Response
         {
             IsSuccess = false,
             Messagge = ex.Message,
         });
     }
 }