Example #1
0
        public frmVerOrcamentosPedido(Object pedido)
        {
            InitializeComponent();
            Pedido p = (Pedido)pedido;

            lblOrcamentos.Content     = "Orçamentos do Pedido ID: " + p.IdPedido;
            dtaOrcamentos.ItemsSource = OrcamentoDAO.ListarOrcamentoPorPedido(p.IdPedido);
            p = null;
        }
Example #2
0
        /// <summary>
        ///     Lista de todos os Status para preenchimento de combo
        /// </summary>
        /// <returns>Lista de SelectListItem</returns>
        public List <SelectListItem> preencheCmbStatus()
        {
            List <OrcamentoStatus> lst      = new OrcamentoDAO().OrcamentoStatus_ListAll(null);
            List <SelectListItem>  lstSaida = new List <SelectListItem>(); // lista de combo

            foreach (var temp in lst)
            {
                string txt = temp.ocs_descricao + " (" + temp.ocs_codigo + ")";
                lstSaida.Add(new SelectListItem()
                {
                    Text = txt, Value = temp.ocs_id.ToString()
                });
            }

            return(lstSaida);
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (txtCNPJ.Text != "" && txtEmpresa.Text != "" && txtValor.Text != "" && txtDescricao.Text != "")
            {
                if (Validacao.ValidarCPF_CNPJ(txtCNPJ.Text))
                {
                    Orcamento orcamento = new Orcamento();
                    orcamento.NomeEmpresa       = txtEmpresa.Text;
                    orcamento.CpfCnpjFornecedor = txtCNPJ.Text;
                    orcamento.Valor             = Convert.ToDouble(txtValor.Text);
                    orcamento.Pedido            = Pedido;
                    orcamento.Descricao         = txtDescricao.Text;

                    if (OrcamentoDAO.CadastrarOrcamento(orcamento))
                    {
                        MessageBox.Show("Orçamento cadastrado com Sucesso!", "Cadastro de Orçamento", MessageBoxButton.OK, MessageBoxImage.Information);
                        txtCNPJ.Clear();
                        txtEmpresa.Clear();
                        txtValor.Clear();
                        txtDescricao.Clear();
                        atualizarDataGridOrcamento();
                    }
                    else
                    {
                        MessageBox.Show("Erro no Cadastro do Orçamento! Verifique.", "Cadastro de Orçamento", MessageBoxButton.OK, MessageBoxImage.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("CNPJ Inválido! Verifique.", "Cadastro de Orçamento", MessageBoxButton.OK, MessageBoxImage.Warning);
                }
            }
            else
            {
                MessageBox.Show("Por Favor, Preencha Todos os Campos!", "Cadastro de Orçamento", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }
 public ProdutoOrcamentoController(ProdutoDAO produtoDAO, OrcamentoDAO orcamentoDAO, ProdutoOrcamentoDAO produtoOrcamento)
 {
     _orcamentoDAO        = orcamentoDAO;
     _produtoDAO          = produtoDAO;
     _produtoOrcamentoDAO = produtoOrcamento;
 }
 public EmpresaAPIController(OrcamentoDAO orcamentoDAO)
 {
     _orcamentoDAO = orcamentoDAO;
 }
 private void atualizarDataGridOrcamento()
 {
     dtaOrcamento.ItemsSource = OrcamentoDAO.ListarOrcamentoPorPedido(Pedido.IdPedido);
     dtaOrcamento.Items.Refresh();
 }
 public OrcamentoController(OrcamentoDAO orcamentoDAO, PedidoDAO pedidoDAO)
 {
     _orcamentoDAO = orcamentoDAO;
     _pedidoDAO    = pedidoDAO;
 }
Example #8
0
        /// <summary>
        /// Preenche Orcamento em Excel e disponibiliza para download
        /// </summary>
        /// <param name="orc_id">Id do Orçamento</param>
        /// <returns>string</returns>
        public string Orcamento_ExportarXLS(int orc_id)
        {
            string arquivo_modelo_caminhoFull = System.Web.HttpContext.Current.Server.MapPath("~/Reports/Modelo_Orcamento.xlsx");
            string arquivo_saida             = "Orcamento_" + DateTime.Now.ToString().Replace(" ", "").Replace(":", "").Replace("/", "") + ".xlsx";
            string arquivo_saida_caminhoFull = System.Web.HttpContext.Current.Server.MapPath("~/temp/") + "/" + arquivo_saida;

            string arquivo_saida_caminho_virtual = HttpContext.Current.Request.Url.Host + "/temp/" + arquivo_saida;
            string saida = "";

            List <string> Headers = new List <string>();

            int nLinhaVisivel = 99;
            int ultimaLinha   = 352;
            int desloc_linha  = 131;

            Gerais ger = new Gerais();

            try
            {
                // apaga arquivos antigos da pasta temp
                new ObjetoBLL().limpaArquivosAntigos();

                File.Copy(arquivo_modelo_caminhoFull, arquivo_saida_caminhoFull);


                // faz busca os DADOS no banco
                List <OrcamentoDetalhes>   lstOrcamentoDetalhes = new OrcamentoDAO().OrcamentoDetalhes_ListAll(orc_id, 1);
                List <ServicosAdicionados> lstOrcamento_Servicos_Adicionados = new OrcamentoDAO().Orcamento_Servicos_Adicionados_ListAll(orc_id, 0);

                // Abre a planilha para edicao
                using (SpreadsheetDocument doc = SpreadsheetDocument.Open(arquivo_saida_caminhoFull, true))
                {
                    // LEITURA DA PLANILHA
                    Worksheet worksheet = ger.GetWorksheet(doc, "Orcamento");

                    // ======= PREENCHE OS DADOS ===============================================
                    string  valor          = "";
                    decimal qtAdotadaValor = -1;

                    // pega o estilo da planilha estilos: borda direita preta e borda direita +fonte vermelha
                    Worksheet worksheet_estilos = ger.GetWorksheet(doc, "estilos");
                    Cell      cell_BordaDireita = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(1));
                    Cell      cell_BordaDireita_Fonte_Vermelha = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(2));
                    Cell      cell_Fonte_Vermelha_Centralizado = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(3));
                    Cell      cell_BordaDireita_Centralizado   = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(4));
                    Cell      cell_BordaDireita_Fonte_Vermelha_Centralizado = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(5));
                    Cell      cell_Fonte_Vermelha_Direita = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(6));
                    Cell      cell_Borda_Superior         = ger.GetCell(worksheet_estilos, "B", Convert.ToUInt32(7));


                    // preenchimento do grid Tabelao
                    for (int li = 0; li < lstOrcamentoDetalhes.Count; li++)
                    {
                        // TABELA HEADER COM OS DADOS DA 1A LINHA
                        if (li == 0)
                        {
                            for (int li2 = 4; li2 <= 11; li2++)
                            {
                                Cell cell = ger.GetCell(worksheet, "B", Convert.ToUInt32(li2));
                                cell.DataType = DocumentFormat.OpenXml.Spreadsheet.CellValues.String;

                                switch (li2)
                                {
                                case 4: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_cod_orcamento)); break;

                                case 5: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_versao)); break;

                                case 6: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_descricao)); break;

                                case 7: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].ocs_descricao)); break;

                                case 8: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_objetos_associados)); break;

                                case 9: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_data_validade)); break;

                                case 10: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_data_base)); break;

                                case 11: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[0].orc_ativo)); break;
                                }
                            }
                            Cell cellTitulo = ger.GetCell(worksheet, "A", Convert.ToUInt32(2));
                            cellTitulo.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.String;
                            cellTitulo.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString("Orçamento " + lstOrcamentoDetalhes[0].orc_cod_orcamento + " versão " + lstOrcamentoDetalhes[0].orc_versao.ToString()));

                            Cell cell1 = ger.GetCell(worksheet, "D", Convert.ToUInt32(124));
                            cell1.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                            cell1.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamentoDetalhes[0].valor_total_adotado)));

                            Cell cell2 = ger.GetCell(worksheet, "D", Convert.ToUInt32(126));
                            cell2.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                            cell2.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamentoDetalhes[0].valor_total_sugerido)));
                        }


                        // VARRE as COLUNAS A até X para preenchimento do tabelao
                        for (int col = 65; col <= 88; col++)
                        {
                            Cell cell = ger.GetCell(worksheet, ((char)col).ToString(), Convert.ToUInt32(li + desloc_linha));
                            cell.DataType = DocumentFormat.OpenXml.Spreadsheet.CellValues.String;

                            // coloca os valores
                            switch (col)
                            {
                            case 65: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].obj_codigoOAE)); break;

                            case 67: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].obj_codigoElemento)); break;

                            case 69: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].ian_numero)); break;

                            case 70: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].atp_codigo)); break;

                            case 71: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].leg_codigo)); break;

                            case 72: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].ale_codigo)); break;

                            case 73: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].aca_codigo)); break;

                            case 74:
                                cell.DataType   = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.StyleIndex = cell_BordaDireita_Centralizado.StyleIndex;
                                cell.CellValue  = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade)));
                                break;

                            case 75: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].rpt_id_sugerido_codigo)); break;

                            case 76:
                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_sugerida)));
                                break;

                            case 77: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamentoDetalhes[li].rpt_id_sugerido_unidade)); break;

                            case 78:
                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamentoDetalhes[li].rtu_preco_unitario_sugerido)));
                                break;

                            case 80:
                                cell.DataType   = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.StyleIndex = cell_BordaDireita.StyleIndex;
                                cell.CellValue  = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamentoDetalhes[li].rtu_valor_total_linha_sugerido)));
                                break;

                            case 81:
                                cell.StyleIndex = cell_BordaDireita.StyleIndex;
                                break;

                            case 82:
                                valor          = lstOrcamentoDetalhes[li].rpt_id_adotado_codigo;
                                qtAdotadaValor = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                if (qtAdotadaValor == 0)
                                {
                                    valor = lstOrcamentoDetalhes[li].rpt_id_sugerido_codigo;
                                }

                                if (lstOrcamentoDetalhes[li].rpt_id_adotado_codigo != lstOrcamentoDetalhes[li].rpt_id_sugerido_codigo)
                                {
                                    cell.StyleIndex = cell_Fonte_Vermelha_Centralizado.StyleIndex;
                                }

                                cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(valor));
                                break;

                            case 83:
                                decimal valor1 = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                qtAdotadaValor = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                if (qtAdotadaValor == 0)
                                {
                                    valor1 = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_sugerida);
                                }

                                if (lstOrcamentoDetalhes[li].ian_quantidade_adotada != lstOrcamentoDetalhes[li].ian_quantidade_sugerida)
                                {
                                    cell.StyleIndex = cell_Fonte_Vermelha_Centralizado.StyleIndex;
                                }

                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(valor1)));
                                break;

                            case 84:
                                valor          = lstOrcamentoDetalhes[li].rpt_id_adotado_unidade;
                                qtAdotadaValor = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                if (qtAdotadaValor == 0)
                                {
                                    valor = lstOrcamentoDetalhes[li].rpt_id_sugerido_unidade;
                                }

                                if (lstOrcamentoDetalhes[li].rpt_id_adotado_unidade != lstOrcamentoDetalhes[li].rpt_id_sugerido_unidade)
                                {
                                    cell.StyleIndex = cell_Fonte_Vermelha_Centralizado.StyleIndex;
                                }

                                cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(valor));
                                break;

                            case 85:
                                decimal valor2 = Convert.ToDecimal(lstOrcamentoDetalhes[li].rtu_preco_unitario_adotado);
                                qtAdotadaValor = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                if (qtAdotadaValor == 0)
                                {
                                    valor2 = Convert.ToDecimal(lstOrcamentoDetalhes[li].rtu_preco_unitario_sugerido);
                                }

                                if (lstOrcamentoDetalhes[li].rtu_preco_unitario_adotado != lstOrcamentoDetalhes[li].rtu_preco_unitario_sugerido)
                                {
                                    cell.StyleIndex = cell_Fonte_Vermelha_Direita.StyleIndex;
                                }

                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(valor2)));
                                break;

                            case 87:
                                decimal valor3 = Convert.ToDecimal(lstOrcamentoDetalhes[li].rtu_valor_total_linha_adotado);
                                qtAdotadaValor = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                if (qtAdotadaValor == 0)
                                {
                                    valor3 = Convert.ToDecimal(lstOrcamentoDetalhes[li].rtu_valor_total_linha_sugerido);
                                }

                                if (lstOrcamentoDetalhes[li].rtu_valor_total_linha_adotado != lstOrcamentoDetalhes[li].rtu_valor_total_linha_sugerido)
                                {
                                    cell.StyleIndex = cell_Fonte_Vermelha_Direita.StyleIndex;
                                }

                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(valor3)));
                                break;

                            case 88:
                                qtAdotadaValor = Convert.ToDecimal(lstOrcamentoDetalhes[li].ian_quantidade_adotada);
                                if (qtAdotadaValor == 0)
                                {
                                    cell.StyleIndex = cell_Fonte_Vermelha_Direita.StyleIndex;
                                }
                                break;
                            }
                        }
                    }

                    // coloca borda inferior na ultima linha
                    for (int col = 65; col <= 88; col++)
                    {
                        Cell cell = ger.GetCell(worksheet, ((char)col).ToString(), Convert.ToUInt32(lstOrcamentoDetalhes.Count + desloc_linha));
                        cell.StyleIndex = cell_Borda_Superior.StyleIndex;
                    }


                    // **** PREENCHIMENTO DO GRID SERVICOS ADICIONADOS *********************************************
                    desloc_linha = 19;
                    for (int li = 0; li < lstOrcamento_Servicos_Adicionados.Count; li++)
                    {
                        for (int col = 65; col <= 78; col++) // VARRE as COLUNAS A até N
                        {
                            Cell cell = ger.GetCell(worksheet, ((char)col).ToString(), Convert.ToUInt32(li + desloc_linha));
                            cell.DataType = DocumentFormat.OpenXml.Spreadsheet.CellValues.String;

                            // coloca os valores
                            switch (col)
                            {
                            case 65: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamento_Servicos_Adicionados[li].obj_codigo)); break;

                            case 67: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamento_Servicos_Adicionados[li].ose_quantidade)); break;

                            case 68: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamento_Servicos_Adicionados[li].UnidMed)); break;

                            case 69: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamento_Servicos_Adicionados[li].CodSubItem)); break;

                            case 70: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamento_Servicos_Adicionados[li].NomeSubItem)); break;

                            case 74: cell.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(Convert.ToString(lstOrcamento_Servicos_Adicionados[li].ose_fase)); break;

                            case 75:
                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamento_Servicos_Adicionados[li].PrecoUnit)));
                                break;

                            case 77:
                                cell.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                                cell.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamento_Servicos_Adicionados[li].valor_total_linha)));
                                break;
                            }
                        }
                    }

                    // coloca borda inferior na ultima linha
                    for (int col = 65; col <= 78; col++)
                    {
                        Cell cell = ger.GetCell(worksheet, ((char)col).ToString(), Convert.ToUInt32(lstOrcamento_Servicos_Adicionados.Count + desloc_linha));
                        cell.StyleIndex = cell_Borda_Superior.StyleIndex;
                    }


                    // oculta as linhas em branco a mais
                    for (int k = lstOrcamento_Servicos_Adicionados.Count + desloc_linha + 1; k < 123; k++)
                    {
                        Row refRow = ger.GetRow(worksheet, Convert.ToUInt16(k));
                        refRow.Hidden = new BooleanValue(true); // oculta a linha
                    }


                    // prenche os totais dos servicos adicionados
                    if (lstOrcamento_Servicos_Adicionados.Count > 0)
                    {
                        decimal valorGeral = Convert.ToDecimal(lstOrcamento_Servicos_Adicionados[0].valor_total) + Convert.ToDecimal(lstOrcamentoDetalhes[0].valor_total_adotado);

                        Cell cellTitulo1 = ger.GetCell(worksheet, "B", Convert.ToUInt32(13));
                        cellTitulo1.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                        cellTitulo1.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(valorGeral)));

                        Cell cellTitulo2 = ger.GetCell(worksheet, "D", Convert.ToUInt32(15));
                        cellTitulo2.DataType  = DocumentFormat.OpenXml.Spreadsheet.CellValues.Number;
                        cellTitulo2.CellValue = new CellValue(DocumentFormat.OpenXml.DecimalValue.FromDecimal(Convert.ToDecimal(lstOrcamento_Servicos_Adicionados[0].valor_total)));
                    }


                    // fecha o arquivo e retorna
                    doc.Save();
                    doc.Close();
                }

                return(arquivo_saida);
            }
            catch (Exception ex)
            {
                saida = "erro:" + ex.ToString();
            }

            return("");
        }
Example #9
0
        static void Main(string[] args)
        {
            Funcionario           func           = new Funcionario();
            FuncionarioController funcController = new FuncionarioController();

            Console.WriteLine("Informe o usuário: ");
            string user = Console.ReadLine().ToLower();

            Console.WriteLine("Informe a senha: ");
            string senha = Console.ReadLine();

            func.setUsuario(user);
            func.setSenha(senha);

            bool   funcPermitido = funcController.efetuarLogin(func);
            string opc;


            if (funcPermitido)
            {
                do
                {
                    Console.Clear();
                    Console.WriteLine(msg);
                    msg = "";

                    Console.WriteLine("================================\n" +
                                      "1. Cadastrar clientes\n" +
                                      "2. Cadastrar funcionários\n" +
                                      "3. Tabela de Preços\n" +
                                      "4. Solicitar orçamento\n" +
                                      "5. Sair\n" +
                                      "================================\n");

                    Console.WriteLine("Escolha uma opção: ");
                    opc = Console.ReadLine();


                    switch (opc)
                    {
                    case "1":

                        bool clienteValido = ClienteController.cadastrarCliente();

                        if (clienteValido)
                        {
                            msg += "Cliente cadastrado com Sucesso!\n";
                        }
                        else
                        {
                            msg += "Cliente NÃO Cadastrado!\n";
                        }
                        break;

                    case "2":

                        bool funcionarioValido = funcController.cadastrarFuncionario();
                        if (funcionarioValido)
                        {
                            msg += "Funcionario cadastrado com Sucesso!";
                        }
                        else
                        {
                            msg += "Funcionario NÃO Cadastrado!";
                        }
                        break;

                    case "3":
                        OrcamentoDAO oc = new OrcamentoDAO();
                        oc.exibirServicos();
                        break;

                    case "4":
                        bool orcamentoValido = OrcamentoController.cadastrarOrcamento();
                        if (orcamentoValido)
                        {
                            msg += "Orçamento cadastrado com Sucesso!";
                        }
                        else
                        {
                            msg += "Orçamento NÃO Cadastrado!";
                        }
                        break;

                    case "5":
                        Console.WriteLine("Programa finalizado!");
                        break;

                    default:
                        msg += "\nOpção inválida, tente novamente!\n";
                        break;
                    }
                } while (!opc.Equals("5"));
            }
            else
            {
                Console.WriteLine("Funcionario NÃO AUTORIZADO!");
            }
        }