Exemplo n.º 1
0
        //Método Buscar Num Doc
        public static DataTable BuscarDocumento(string textobuscar)
        {
            DFuncionario Obj = new DFuncionario();

            Obj.TextoBuscar = textobuscar;
            return(Obj.BuscarDocumento(Obj));
        }
Exemplo n.º 2
0
        // Método Buscar Nome
        public static DataTable BuscarNome(string textobuscar)
        {
            DFuncionario obj = new DFuncionario();

            obj.TextoBuscar = textobuscar;
            return(obj.BuscarNome(obj));
        }
Exemplo n.º 3
0
        //Método Login
        public static DataTable Login(string usuario, string senha)
        {
            DFuncionario Obj = new DFuncionario();

            Obj.Usuario = usuario;
            Obj.Senha   = senha;
            return(Obj.Login(Obj));
        }
Exemplo n.º 4
0
 public List <EFuncionarios> ListaFuncionariosSinUsuario()
 {
     try
     {
         DFuncionario         D = new DFuncionario();
         List <EFuncionarios> l = D.ListaFuncionariosSinUsuario();
         return(l);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 5
0
 public void ModificarFuncionario(EFuncionarios f)
 {
     try
     {
         if (f.Nombres == "" || f.Apellidos == "")
         {
             throw new ArgumentException("Ingrese Nombre y Apellido");
         }
         DFuncionario d = new DFuncionario();
         d.ModificarFuncionario(f);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 6
0
        // Método Editar
        public static string Editar(int idfunc, string nome, string bilhete, string email, int telefone, int idsexo, int idmuni, int idfuncao,
                                    string nomeuser, string senha, Byte imagem)
        {
            DFuncionario obj = new DFuncionario();

            obj.Idfunc   = idfunc;
            obj.Nome     = nome;
            obj.Bilhete  = bilhete;
            obj.Email    = email;
            obj.Telefone = telefone;
            obj.Idsexo   = idsexo;
            obj.Idmuni   = idmuni;
            obj.Idfuncao = idfuncao;
            obj.NomeUser = nomeuser;
            obj.Senha    = senha;
            obj.Imagem   = imagem;
            return(obj.Editar(obj));
        }
Exemplo n.º 7
0
 public void IngresarFuncionario(EFuncionarios f)
 {
     try
     {
         if (f.Nombres == "" || f.Apellidos == "")
         {
             throw new ArgumentException("Ingrese Nombre y Apellido");
         }
         List <EFuncionarios> lista = ListaFuncionarios().Where(x => x.Cedula == f.Cedula).ToList();
         if (lista.Count > 0)
         {
             throw new ArgumentException("La cedula " + f.Cedula + " ya existe");
         }
         DFuncionario d = new DFuncionario();
         d.IngresarFuncionario(f);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }