Пример #1
0
        private void btnBuscarProduto_Click(object sender, EventArgs e)
        {
            fBusca_Produto frmProduto = new fBusca_Produto(1);

            frmProduto.ShowDialog();
            if (clsStatic.produto != null)
            {
                txtIdProduto.Text      = clsStatic.produto.Produto_ID.ToString();
                txtDsProduto.Text      = clsStatic.produto.Descricao;
                txtUnidadeProduto.Text = clsStatic.produto.Unidade;
                txtValor.Text          = clsStatic.produto.Valor.ToString("#,##0.00");
                if (!String.IsNullOrEmpty(clsStatic.produto.Image))
                {
                    imgProduto.BackgroundImage = clsUtil.Base64ToImage(clsStatic.produto.Image);
                }
            }
            else
            {
                txtIdProduto.Text          = "";
                txtDsProduto.Text          = "";
                txtUnidadeProduto.Text     = "";
                txtQtdProduto.Text         = "";
                txtValor.Text              = "";
                imgProduto.BackgroundImage = null;
            }
        }
Пример #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            fBusca_Produto fBuscaPrd = new fBusca_Produto(0);

            fBuscaPrd.ShowDialog();
            if (clsStatic.produto == null)
            {
                LimparCampos();
            }
            else
            {
                CarregaCampos();
            }
        }