Ejemplo n.º 1
0
 public static List <Funcionario> getFuncionarioByPerfil(int codigoPerfil, out string mensagemErro)
 {
     mensagemErro = "";
     try
     {
         return(FuncionarioDAL.getFuncionarioByPerfil(codigoPerfil, out mensagemErro));
     }
     catch (Exception ex)
     {
         mensagemErro = ex.Message;
         Uteis.GravarLogErro(ex.TargetSite.Name, ex.Message);
         return(null);
     }
 }
Ejemplo n.º 2
0
 public bool InserFuncionario(Funcionario func, out string mensagemErro)
 {
     mensagemErro = "";
     try
     {
         return(FuncionarioDAL.InsertFuncionario(func, out mensagemErro));
     }
     catch (Exception ex)
     {
         mensagemErro = ex.Message;
         Uteis.GravarLogErro(ex.TargetSite.Name, ex.Message);
         return(false);
     }
 }
Ejemplo n.º 3
0
 public static Funcionario getFuncionario(string login, out string mensagemErro)
 {
     mensagemErro = "";
     try
     {
         return(FuncionarioDAL.getFuncionario(login, out mensagemErro));
     }
     catch (Exception ex)
     {
         mensagemErro = ex.Message;
         Uteis.GravarLogErro(ex.TargetSite.Name, ex.Message);
         return(null);
     }
 }
Ejemplo n.º 4
0
 public bool DeleteFuncionario(int codigo, out string mensagemErro)
 {
     mensagemErro = "";
     try
     {
         return(FuncionarioDAL.DeleteFuncionario(codigo, out mensagemErro));
     }
     catch (Exception ex)
     {
         mensagemErro = ex.Message;
         Uteis.GravarLogErro(ex.TargetSite.Name, ex.Message);
         return(false);
     }
 }
Ejemplo n.º 5
0
 public static Funcionario.MetaAgente getMetaAgente(int codigoAgente, DateTime inicioCiclo, DateTime fimCiclo, out string mensagemErro)
 {
     mensagemErro = "";
     try
     {
         return(FuncionarioDAL.getMetaAgente(codigoAgente, inicioCiclo, fimCiclo, out mensagemErro));
     }
     catch (Exception ex)
     {
         mensagemErro = ex.Message;
         Uteis.GravarLogErro(ex.TargetSite.Name, ex.Message);
         return(null);
     }
 }
Ejemplo n.º 6
0
        public Funcionario(int codigoFuncionario)
        {
            string mensagemErro = "";

            Funcionario func = FuncionarioDAL.getFuncionarioByCodigo(codigoFuncionario, out mensagemErro);

            this.Codigo   = func.Codigo;
            this.Login    = func.Login;
            this.Senha    = func.Senha;
            this.CPF      = func.CPF;
            this.Nome     = func.Nome;
            this.Sexo     = func.Sexo;
            this.Email    = func.Email;
            this.Telefone = func.Telefone;
            this.Ativo    = func.Ativo;
            this.PODE_VER_RELATORIO_VENDAS  = func.PODE_VER_RELATORIO_VENDAS;
            this.PODE_GERAR_BOLETO          = func.PODE_GERAR_BOLETO;
            this.PODE_GERAR_REMESSA_RETORNO = func.PODE_GERAR_REMESSA_RETORNO;
            this.PODE_CONFIGURAR_DIREITOS   = func.PODE_CONFIGURAR_DIREITOS;
            this.PODE_CADASTRAR_PRODUTOS    = func.PODE_CADASTRAR_PRODUTOS;
            this.PODE_ALTERAR_CORREIO       = func.PODE_ALTERAR_CORREIO;
            this.Perfil = func.Perfil;
        }