protected void Change_Produto(Object sender, EventArgs e) { if (DropProduto.SelectedItem.ToString() != "Tipo") { _ler = new LerSelect(); var Dt = _ler.LerProduto(DropProduto.SelectedValue.ToString()); LabelTituloPopup.Text = Dt.ValDataTable.Rows[0]["0"].ToString(); ImgPopup.Attributes.Add("title", Dt.ValDataTable.Rows[0]["1"].ToString()); ImgPopup.ImageUrl = Dt.ValDataTable.Rows[0]["2"].ToString(); /* ImgPopup.Attributes.Add("src", Dt.ValDataTable.Rows[0]["2"].ToString());*/ } else { LabelTituloPopup.Text = "Veja como é fácil"; ImgPopup.Attributes.Add("title", "Anuncie agora mesmo"); ImgPopup.ImageUrl = "../Images/anuncio.jpg"; } }
protected void Reload() { TextProduto.MaxLength = 20; TextDescrição.MaxLength = 200; _ler = new LerSelect(); var Dt = _ler.LerProduto(); if (Dt != null) { GridProdutos.DataSource = Dt.ValDataTable; GridProdutos.DataBind(); } _ler = new LerSelect(); var DtCatePai = _ler.LerDropCategoriaPai(); if (DtCatePai != null && DropCategoriaPai.Text == "") { DropCategoriaPai.DataTextField = "Categoria"; DropCategoriaPai.DataSource = DtCatePai.ValDataTable; DropCategoriaPai.DataBind(); DropCategoriaPai.AppendDataBoundItems = true; } }