public BuscarTiendaViewModel(IWindowManager windowmanager, Reportes.reporteServiciosViewModel reporteServiciosViewModel, int ventanaAccion) : this(windowmanager) { uSQL = new UbigeoSQL(); CmbDpto = uSQL.BuscarDpto(); deft = new Ubigeo(); deft.Nombre = "TODOS"; CmbDpto.Insert(0, deft); Index1 = 0; this.reporteServiciosViewModel = reporteServiciosViewModel; this.ventanaAccion = ventanaAccion; }
public MantenerTiendaViewModel(IWindowManager windowmanager) { _windowManager = windowmanager; uSQL = new UbigeoSQL(); tSQL = new TiendaSQL(); pxaSQL = new ProductoSQL(); aSQL = new AlmacenSQL(); tzSQL = new TipoZonaSQL(); CmbZonas = (new TipoZonaSQL()).BuscarZona(); CmbDpto = uSQL.BuscarDpto(); LstProductos = new List<ProductoxTienda>(); LstProdAgregados = new List<ProductoxTienda>(); //LstProductos = pxaSQL.BuscarProductoxTienda(); Content = "Generar distribución"; accion = 1; }
public BuscarTiendaViewModel(IWindowManager windowmanager) { _windowManager = windowmanager; uSQL = new UbigeoSQL(); CmbDpto = uSQL.BuscarDpto(); deft= new Ubigeo(); deft.Nombre="TODOS"; CmbDpto.Insert(0, deft); Index1 = 0; }
public MantenerAlmacenViewModel(IWindowManager windowmanager) { _windowManager = windowmanager; uSQL = new UbigeoSQL(); tSQL = new TiendaSQL(); pxaSQL = new ProductoSQL(); aSQL = new AlmacenSQL(); tzSQL = new TipoZonaSQL(); int existe = aSQL.existeCentral(); Editar = true; if (existe > 0) { Almacenes central = aSQL.BuscarAlmacen(-1, -1, 3); accion = 2; Editar = false; /* idTienda = t.IdTienda; */ /*carga de la informacion general*/ TxtNombre = central.Nombre; TxtTelefono = central.Telefono; TxtDir = central.Direccion; List<Ubigeo> u = uSQL.buscarUbigeo2(central.IdUbigeo); /*carga de los combobox*/ CmbDpto = uSQL.BuscarDpto(); Index1 = CmbDpto.FindIndex(x => x.CodDpto == u[0].CodDpto); SelectedDpto = u[0].CodDpto; Index2 = CmbProv.FindIndex(x => x.CodProv == u[0].CodProv); SelectedProv = u[0].CodProv; Index3 = CmbDist.FindIndex(x => x.CodDist == u[0].CodDist); Content = "Ver distribución"; TxtNumColumns = central.NroColumnas.ToString(); TxtNumRows = central.NroFilas.ToString(); TxtAltura = central.Altura.ToString(); lstZonas = tzSQL.ObtenerZonasxAlmacen(central.IdAlmacen, 3); _windowManager.ShowDialog(new AlertViewModel(_windowManager, "El almacen central ya existe")); } else if (existe == 0) { CmbZonas = (new TipoZonaSQL()).BuscarZona(); CmbDpto = uSQL.BuscarDpto(); Content = "Generar distribución"; } else { _windowManager.ShowDialog(new AlertViewModel(_windowManager, "Ocurrió un problema")); } }