private void frmCategoria_Load(object sender, EventArgs e) { //Lista = TbCategoriaDAO.SelectAll(); //Lista = TbCategoriaBL.SelectAll(); //ProxyMantenimiento.ManServiceClient proxyMan = new ProxyMantenimiento.ManServiceClient("HTTP_EndPoint"); ProxyManIis.ManServiceClient proxyManIis = new ProxyManIis.ManServiceClient("BasicHttpBinding_IManService"); Lista = proxyManIis.SelectAllFromCategoria(); this.TbCategoriaBindingSource.DataSource = Lista; this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; }
private void frmProducto_Load(object sender, EventArgs e) { //Lista = TbProductoBE.SelectAll(); //Lista = TbProductoDAO.SelectAll(); //listaProducto = TbProductoDAO.SelectAll(); //listaProducto = TbProductoBL.SelectAll(); listaProducto = proxyProdcat.SelectAllFromProducto(); //listaCategoria = TbCategoriaDAO.SelectAll(); //listaCategoria = TbCategoriaBL.SelectAll(); listaCategoria = proxyProdcat.SelectAllFromCategoria(); //this.TbProductobindingSource.DataSource = Lista; //this.dataGridView1.SelectionMode = // DataGridViewSelectionMode.FullRowSelect; var listJoin = from prod in listaProducto join cat in listaCategoria on prod.codCategoria equals cat.CodCategoria select new { codProducto = prod.CodProducto, descripcion = prod.Descripcion, categoria = cat.Nombre, precio = prod.Precio }; //this.TbProductobindingSource.DataSource = listJoin.ToList(); this.dataGridView1.DataSource = listJoin.ToList(); this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; }