private void MarcaProducto_Cargar() { try { ItemWCFClient objItemsWCF = new ItemWCFClient(); VBG04054Result objItem = new VBG04054Result(); List <VBG04054Result> lstItems; lstItems = objItemsWCF.Item_CategoriasGxOpciones(((Usuario_LoginResult)HttpContext.Current.Session["Usuario"]).idEmpresa, ((Usuario_LoginResult)HttpContext.Current.Session["Usuario"]).codigoUsuario, 5).ToList(); lstItems.Insert(0, objItem); objItem.ID_ItemEstructuraOpcion = 0; objItem.Nombre = "Todos"; cboMarca.DataSource = lstItems; cboMarca.DataTextField = "Nombre"; cboMarca.DataValueField = "ID_ItemEstructuraOpcion"; cboMarca.DataBind(); cboMarca.SelectedValue = "0"; } catch (Exception ex) { throw ex; } }
private void TipoProducto_Cargar() { try { ItemWCFClient objItemsWCF = new ItemWCFClient(); VBG04054Result objItem = new VBG04054Result(); List <VBG04054Result> lstItems; lstItems = objItemsWCF.Item_CategoriasGxOpciones(((Usuario_LoginResult)HttpContext.Current.Session["Usuario"]).idEmpresa, ((Usuario_LoginResult)HttpContext.Current.Session["Usuario"]).codigoUsuario, 2).ToList(); lstItems = lstItems.FindAll(x => x.Nombre.Contains("Prima") || x.Nombre.Contains("Producto")).ToList(); //lstItems.Insert(0, objItem); //objItem.ID_ItemEstructuraOpcion = 0; //objItem.Nombre = "Todos"; cboTipoMaterial.DataSource = lstItems; cboTipoMaterial.DataTextField = "Nombre"; cboTipoMaterial.DataValueField = "ID_ItemEstructuraOpcion"; cboTipoMaterial.DataBind(); cboTipoMaterial.SelectedIndex = 0; } catch (Exception ex) { throw ex; } }