Example #1
0
        public void btnCadastrar_Click(object sender, EventArgs e)
        {
            if (VerificarDigitacao() == false)
            {
                return;
            }

            BLL.Cargo c = new BLL.Cargo();
            c.Descricao = txtNomeCargo.Text;
            c.IncluirComParametro();
            MessageBox.Show("Cargo cadastrado!!!");
        }
        private void CadastrarCargo(object o, EventArgs e)
        {
            BLL.Cargo c = new BLL.Cargo();
            c.NomeCargo      = txtCargo.Text;
            c.StatusCargo    = 1;
            c.Abreviacao     = txtAbreviacao.Text;
            c.DescricaoCargo = txtDescricao.Text;

            if (txtAbreviacao.Text == "" || txtCargo.Text == "" || txtDescricao.Text == "")
            {
                MessageBox.Show("Por favor Preencha todos os campos!!!");
            }
            else
            {
                c.IncluirComParametro();
                MessageBox.Show("Cargo Cadastrado com sucesso !!!");
            }
        }