private void CarregarDados(int id_obra) { ItensEstoqueBL itEsBL = new ItensEstoqueBL(); List<ItensEstoque> itensEstoque = itEsBL.PesquisarMovObraBL(id_obra); if (itensEstoque.Count > 0) { foreach (ItensEstoque ltItEs in itensEstoque) { hfId.Value = ltItEs.Id.ToString(); hfIdItem.Value = ltItEs.ObraId.ToString(); txtData.Text = ltItEs.Data.ToString("dd/MM/yyyy"); txtQtdMin.Text = ltItEs.QtdMinima.ToString(); txtVlrMedio.Text = ltItEs.VlrCusto.ToString(); txtVlrVenda.Text = ltItEs.VlrVenda.ToString(); chkControlaEstoque.Checked = ltItEs.ControlaEstoque; ddlStatus.SelectedValue = ltItEs.Status == true ? "A" : "I"; } } }