private async void cargarCategorias() { if (!formProductoNuevo.nuevo) { catProducto = await categoriaModel.categoriaProducto(formProductoNuevo.currentIDProducto); List <Categoria> categoriasDelProducto = catProducto.todo; //Mostrar las categorias separadas por comas if (categoriasDelProducto.Count <= 0) { return; } string textoCategoria = ""; foreach (Categoria categoria in categoriasDelProducto) { textoCategoria += categoria.nombreCategoria + " ,"; } textoCategoria = textoCategoria.Substring(0, textoCategoria.Length - 1); textCategoria.Text = textoCategoria; } }
private async Task cargarRegistros() { catProducto = await categoriaModel.categoriaProducto(currentIdProducto); }