public void fillData(int id) { List <TallaPorProducto> tallas = new List <TallaPorProducto>(); tallas.AddRange(buissnes.GetTallaPorProductos(id)); List <Productos> producto = new List <Productos>(); List <Colores> lista_colores = new List <Colores>(); producto.AddRange(buissnes.SearchProductos(id, null)); //MessageBox.Show(id.ToString() + producto.FirstOrDefault().Nombre); txt_id.Text = producto.FirstOrDefault().Id.ToString(); if (tallas.FirstOrDefault() != null) { cmb_tallas.Text = tallas.FirstOrDefault().Code; } txt_nombre.Text = producto.FirstOrDefault().Nombre; txt_descripcion.Text = producto.FirstOrDefault().Description; txt_observaciones.Text = producto.FirstOrDefault().Observations; txt_precioDist.Text = producto.FirstOrDefault().PriceDistributor.ToString(); txt_precioCli.Text = producto.FirstOrDefault().PriceClient.ToString(); txt_precioEmp.Text = producto.FirstOrDefault().PriceMember.ToString(); txt_habilitado.Text = producto.FirstOrDefault().IsEnabled.ToString(); txt_fecha_modig.Text = producto.FirstOrDefault().DateUpdate.ToString(); lista_colores.AddRange(buissnes.GetColores()); foreach (var item in lista_colores) { if (item.IdColor == producto.FirstOrDefault().IdColor) { txt_color.Text = item.Name; } } }
public void fillData(int id) { producto.AddRange(buissnes.SearchProductos(id, null)); // MessageBox.Show(id.ToString() + producto.FirstOrDefault().Nombre); txt_id.Text = producto.FirstOrDefault().Id.ToString(); txt_nombre.Text = producto.FirstOrDefault().Nombre; txt_descripcion.Text = producto.FirstOrDefault().Description; txt_observaciones.Text = producto.FirstOrDefault().Observations; txt_precioDist.Text = producto.FirstOrDefault().PriceDistributor.ToString(); txt_precioCli.Text = producto.FirstOrDefault().PriceClient.ToString(); txt_precioEmp.Text = producto.FirstOrDefault().PriceMember.ToString(); txt_habilitado.Text = producto.FirstOrDefault().IsEnabled.ToString(); txt_fecha_modig.Text = DateTime.Now.ToString("dd/MM/yyyy"); lista_tallas.AddRange(buissnes.GetTallas()); foreach (var item in lista_tallas) { cmb_tallas.Items.Add(item.Code); } lista_colores.AddRange(buissnes.GetColores()); foreach (var item in lista_colores) { cmb_color.Items.Add(item.Name); } }
public void fillCmbColors() { List <Colores> colores = new List <Colores>(); colores.AddRange(buissnes.GetColores()); foreach (var item in colores) { cmb_color.Items.Add(item.Name); } }