private void CarregarSabores() { // instanciando um objeto da classe ControllerSabor myControllerSabor = new ControllerSabor(); // passando a fonte de dados para o GridView gvwExibe.DataSource = myControllerSabor.Exibir(chkStatusInativo.Checked ? "0" : "1", Session["ConnectionString"].ToString()); // associando os dados para carregar e exibir gvwExibe.DataBind(); }
private void CarregarSabores() { myControllerSabor = new ControllerSabor(); ddlID_SaborProduto.DataSource = myControllerSabor.Exibir("1", Session["ConnectionString"].ToString()); ddlID_SaborProduto.DataTextField = "NM_Sabor"; ddlID_SaborProduto.DataValueField = "ID_Sabor"; ddlID_SaborProduto.DataBind(); ddlID_SaborProduto.Items.Insert(0, "Sabor"); ddlID_SaborProduto.SelectedIndex = 0; }