Ejemplo n.º 1
0
 private void CarregarCombo(object o, EventArgs e)
 {
     BLL.Vendedor c = new BLL.Vendedor();
     cbFunc.DataSource    = c.Listar(String.Empty, (byte)BLL.FuncoesGerais.TipoStatus.Ativo).Tables[0];
     cbFunc.DisplayMember = "NomeVendedor";
     cbFunc.ValueMember   = "CodigoVendedor";
 }
Ejemplo n.º 2
0
        public void CarregarCombo(object o, EventArgs e)
        {
            BLL.Produto c = new BLL.Produto();
            cbProduto.DataSource    = c.ListarProdDisponiveis().Tables[0];
            cbProduto.DisplayMember = "NomeProduto";
            cbProduto.ValueMember   = "CodigoProduto";
            cbProduto.SelectedIndex = -1;

            BLL.Vendedor n = new BLL.Vendedor();
            cbVendedor.DataSource    = n.Listar(String.Empty, (byte)BLL.FuncoesGerais.TipoStatus.Ativo).Tables[0];
            cbVendedor.DisplayMember = "NomeVendedor";
            cbVendedor.ValueMember   = "CodigoVendedor";



            BLL.Cliente cl = new BLL.Cliente();
            cbCliente.DataSource    = cl.Listar(String.Empty, (byte)BLL.FuncoesGerais.TipoStatus.Ativo).Tables[0];
            cbCliente.DisplayMember = "NomeCliente";
            cbCliente.ValueMember   = "CodigoCliente";
        }
Ejemplo n.º 3
0
        public void CadastrarFuncionario(object o, EventArgs e)
        {
            BLL.Funcionario func = new BLL.Funcionario();
            func.NomeFuncionario = txtNome.Text;
            if (rbMasc.Checked)
            {
                func.Sexo = "M";
            }
            if (rbFem.Checked)
            {
                func.Sexo = "F";
            }
            func.EmailFuncionario = txtEmail.Text;
            func.CpfFuncionario   = txtCpf.Text;

            func.NascimentoFuncionario = Convert.ToDateTime(txtData.Text);
            func.Cep               = txtCep.Text;
            func.Logradouro        = txtEnd.Text;
            func.Bairro            = txtBairro.Text;
            func.Cidade            = txtCidade.Text;
            func.UF                = "SP";
            func.Numero            = txtNum.Text;
            func.Complemento       = txtComplemento.Text;
            func.StatusFuncionario = 1;

            if (checkVendedor.Checked)
            {
                func.IncluirComParametro();
                BLL.Vendedor v = new BLL.Vendedor();
                v.NomeVendedor      = txtNome.Text;
                v.StatusVendedor    = 1;
                v.CodigoFuncionario = func.RetornarFuncionario();
                v.IncluirComParametro();
                MessageBox.Show("Funcionário cadastrado como vendedor!!");
            }
            else
            {
                func.IncluirComParametro();
                MessageBox.Show("Funcionario cadastrado");
            }
        }