Example #1
0
        private void btnCadastroCli_Click(object sender, EventArgs e)
        {
            Contexto contexto = new Contexto();
            var      permicao = contexto.Permicao.FirstOrDefault(x => x.id == Funcionario.Permicoes_id);

            if (permicao.frmCliente == true)
            {
                frmAddCliente frm = new frmAddCliente(UserID);
                frm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Você não permição para consultar Clientes\n" +
                                "Por favor contate seu administrador.",
                                "Não foi possível consultar",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information,
                                MessageBoxDefaultButton.Button1);
            }
        }
Example #2
0
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAddCliente cliente = new frmAddCliente(UsuarioId);

            cliente.ShowDialog();
        }