Example #1
0
        public Object ExecutarOpBD(char _c, Vaga _o)
        {
            try
            {
                VagaDAO dao = new VagaDAO();
                switch (_c)
                {
                case 'i':
                    return(dao.InserirBD(_o));

                case 'd':
                    return(dao.DeletarBD(_o.Id));

                case 'a':
                    return(dao.AlterarBD(_o));

                case 'l':
                    return(dao.ListarTodos());

                case 'b':
                    return(dao.BuscarPorID(_o.Id));

                default:
                    return(null);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }