Exemple #1
0
        //Form Pedido Sobrecarregado Com Dados do novo Cliente
        public FormPedido(ClienteDTO DadosCliente)
        {
            InitializeComponent();
            Valor = 0;
            GRID_Produtos.DataSource = null;

            List <ProdutoDTO> LISTA = ClassBLL.BuscarProdutos();

            GRID_Produtos.Rows.Clear();

            foreach (var FORpass in LISTA)
            {
                string[] linhaContato = { FORpass.IDProduto1.ToString(), FORpass.Categoria1, FORpass.NomeProduto1, FORpass.Valor1.ToString(), };
                GRID_Produtos.Rows.Add(linhaContato);
            }

            GRID_Produtos.Visible = true;

            if (DadosCliente != null)
            {
                txtContato.Visible     = true;
                BoxNome.Visible        = true;
                BoxEndereco.Visible    = true;
                BoxCep.Visible         = true;
                BoxNumero.Visible      = true;
                BoxComplemento.Visible = true;

                txtContato.Text     = DadosCliente.ContatoCliente1;
                txtNome.Text        = DadosCliente.NomeCLiente1;
                txtEndereco.Text    = DadosCliente.EnderecoCliente1;
                txtCep.Text         = DadosCliente.CepCliente1;
                txtNumero.Text      = DadosCliente.CepCliente1;
                txtComplemento.Text = DadosCliente.ComplementoCliente1;
            }
        }
Exemple #2
0
        //Abrir o Formulario Com Grid Cheio
        public FormProdutosEDIT()
        {
            InitializeComponent();

            GRID_Produtos.DataSource = null;

            List <ProdutoDTO> LISTA = ClassBLL.BuscarProdutos();

            GRID_Produtos.Rows.Clear();

            foreach (var FORpass in LISTA)
            {
                string[] linhaContato = { FORpass.IDProduto1.ToString(), FORpass.Categoria1, FORpass.NomeProduto1, FORpass.Ingredientes1, FORpass.Valor1.ToString(), };
                GRID_Produtos.Rows.Add(linhaContato);
            }

            GRID_Produtos.Visible = true;
        }