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"); }
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); } }
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"); }
public async void Buscarcod() { var Detailcod = await wSLservice.GetProdDetail(Code); if (Detailcod.IsSuccess) { var codigoView = new CodigoViewModel { Codigo = Detailcod.Codigo, Detalle = Detailcod.Detalle, UnidadMed = Detailcod.UnidadMed, Ruta = Ruta, DescripcionRuta = DescripcionRuta, IdAsignRuta = IdAsignRuta, }; var mainViewModel = MainViewModel.GetInstance(); mainViewModel.SetCurrentCode(codigoView); navigationService = new NavigationService(); navigationService.Navigate("IngProdInventario"); } else { await dialogService.Showmessage("Error", Detailcod.Messagge); } }
public MainViewModel() { //Singleton instance = this; //creacion de observable collection Rutas = new ObservableCollection <RutasItemViewModel>(); //creacion de vistas NewLogin = new LoginViewModel(); dialogService = new DialogService(); CurrentRoute = new RutasItemViewModel(); NewCodigo = new CodigoViewModel(); //Instance services wSLservice = new WSLservice(); dataService = new DataService(); UserLoged = new UserViewModel(); }
public void SetCurrentCode(CodigoViewModel codigoViewModel) { NewCodigo = codigoViewModel; }