Example #1
0
        public static void Criar()
        {
            while (true)
            {
                string mensagem = "Olá usuário, bem vindo ao programa\n" +
                                  "\n  Aplicação Console Final" +
                                  "\n\n" +
                                  "\n    Digite uma das opções abaixo:" +
                                  "\n      0 - Sair do Programa" +
                                  "\n      1 - Para Ler Arquivos" +
                                  "\n      2 - Para Executar a Tabuada" +
                                  "\n      3 - Para Calcular Media de Alunos" +
                                  "\n      4 - Cadastrar Clientes" +
                                  "\n      5 - Cadastrar Usuarios" +
                                  "\n      6 - Cadastrar Fornecedores";
                Console.WriteLine(mensagem);


                Console.Write("\nOpção escolhida: ");
                int valor = int.Parse(Console.ReadLine());

                if (valor == SAIDA_PROGRAMA)
                {
                    break;
                }
                else if (valor == LER_ARQUIVOS)
                {
                    Console.WriteLine("============== Opção Ler Arquivos ==============");
                    Arquivo.Ler(1);
                    Console.ReadLine();
                    Console.Clear();
                }
                else if (valor == TABUADA_PROGRAMA)
                {
                    Console.WriteLine("============== Opção Tabuada ==============");
                    Console.Write("Digite o numero que deseja na tabuada: ");
                    int numero = int.Parse(Console.ReadLine());
                    Tabuada.Calcular(numero);
                    Console.ReadLine();
                    Console.Clear();
                }
                else if (valor == CALCULO_MEDIA)
                {
                    Console.WriteLine("============== Opção Calculo da Média ==============");
                    Media.Aluno();
                    Console.ReadLine();
                    Console.Clear();
                }
                else if (valor == CADASTRAR_CLIENTES)
                {
                    Console.WriteLine("============== Opção Cadastrar Clientes ==============");
                    TelaCliente.Chamar();
                    Console.ReadLine();
                    Console.Clear();
                }
                else if (valor == CADASTRAR_USUARIOS)
                {
                    Console.WriteLine("============== Opção Cadastrar Usuarios ==============");
                    TelaUsuario.Chamar();
                    Console.ReadLine();
                    Console.Clear();
                }
                else if (valor == CADASTRAR_FORNECEDORES)
                {
                    Console.WriteLine("============== Opção Cadastrar Fornecedores ==============");
                    TelaFornecedor.Chamar();
                    Console.ReadLine();
                    Console.Clear();
                }
                else
                {
                    Console.WriteLine("Opção inválida, digite novamente!");
                    Console.ReadLine();
                    Console.Clear();
                }
            }
        }
Example #2
0
        public static void Criar()
        {
            while (true)
            {
                Console.WriteLine("");

                string mensagem = "Olá Usuário! Benvindo ao Programa,\n" +
                                  "\n  Aplicação Console Final\n" +
                                  "\n   Digite uma das opções abaixo: \n" +
                                  "\n    0 - Sair do Programa" +
                                  "\n    1 - Para Ler Arquivos" +
                                  "\n    2 - Para executar a Tabuada" +
                                  "\n    3 - Para Calcular a Média dos Alunos" +
                                  "\n    4 - Cadastrar Clientes" +
                                  "\n    5 - Cadastrar Usuarios" +
                                  "\n    6 - Cadastrar Fornecedores";

                Console.WriteLine(mensagem);

                int valor = int.Parse(Console.ReadLine());

                if (valor == SAIDA_PROGRAMA)
                {
                    break;
                }
                else if (valor == LER_ARQUIVOS)
                {
                    Console.WriteLine("\n========================== Opção Ler Arquivos ==========================\n");
                    Arquivo.Ler(1);
                    Console.WriteLine("\n========================================================================\n");
                }
                else if (valor == TABUADA)
                {
                    Console.WriteLine("\n==================== Opção Tabuada =============================================\n");
                    Console.WriteLine("Digite o numero da Tabuada");
                    int numero = int.Parse(Console.ReadLine());
                    Tabuada.Calcular(numero);
                    Console.WriteLine("\n================================================================================\n");
                }
                else if (valor == CALCULO_MEDIA)
                {
                    Console.WriteLine("\n==================== Opção Calculo da Media========================================\n");
                    Media.Alunos();
                    Console.WriteLine("\n================================================================================\n");
                }
                else if (valor == CADASTRAR_CLIENTES)
                {
                    TelaCliente.Chamar();
                    Console.WriteLine("\n================================================================================\n");
                }
                else if (valor == CADASTRAR_USUARIOS)
                {
                    TelaUsuario.Chamar();
                    Console.WriteLine("\n================================================================================\n");
                }
                else if (valor == CADASTRAR_FORNECEDORES)
                {
                    TelaFornecedor.Chamar();
                    Console.WriteLine("\n================================================================================\n");
                }
                else
                {
                    Console.WriteLine("OPÇAO INVALIDA, DIGITE NOVAMENTE!");
                }
            }
        }
Example #3
0
        //MENU
        public static void Criar()
        {
            while (true)
            {
                Console.WriteLine("##############################                          ###############################");
                Console.WriteLine("##############################    MENU DO SISTEMA       ###############################");
                Console.WriteLine("##############################                          ###############################");

                Console.WriteLine("\n");
                Console.WriteLine("[1]-Ler Arquivo " +
                                  "\n[2]-Calcular Média" +
                                  "\n[3]-Somar" +
                                  "\n[4]-Tabuada" +
                                  "\n[5]-Cliente" +
                                  "\n[6]-Usuário" +
                                  "\n[7]-Envia email" +
                                  "\n[8]-Fornecedor" +
                                  "\n[9]-Sair");
                Console.WriteLine("\n");
                Console.WriteLine("##############################                          ###############################");
                Console.WriteLine("##############################    OPÇÕES DO SITEMAS     ###############################");
                Console.WriteLine("##############################                          ###############################");

                Console.WriteLine("##############################    bbbbbbbbbbbbbbb       ###############################");
                Console.WriteLine("##############################    bbbbbbbbbbbbbbbb      ###############################");
                Console.WriteLine("##############################    bbbb       bbbbb      ###############################");
                Console.WriteLine("##############################    bbbb       bbbbb      ###############################");
                Console.WriteLine("##############################    bbbbbbbbbbbbbb        ###############################");
                Console.WriteLine("##############################    bbbbbbbbbbbbbb        ###############################");
                Console.WriteLine("##############################    bbbb       bbbbbb     ###############################");
                Console.WriteLine("##############################    bbbb       bbbbbbb    ###############################");
                Console.WriteLine("##############################    bbbbbbbbbbbbbbbbbb    ###############################");
                Console.WriteLine("##############################    bbbbbbbbbbbbbbbbb     ###############################");



                int valor = int.Parse(Console.ReadLine());

                if (LER_ARQUIVO == valor)
                {
                    Arquivo.Ler(1);//Ler Arquivo
                }
                else if (CALCULO_MEDIA == valor)
                {
                    Media.Aluno();
                }
                else if (SOMA == valor)
                {
                    Soma.CalcularSoma();
                }
                else if (TABUADA == valor)
                {
                    Tabuada.CalacularTabuada();
                }
                else if (CADASTRAR_CLIENTE == valor)
                {
                    TelaCliente.Chamar();
                }
                else if (CADASTRAR_USUARIO == valor)
                {
                    TelaUsuario.Chamar();
                }
                else if (ENVIAR_EMAIL == valor)
                {
                    TelaEmail.EnviaEmail();
                }
                else if (CADASTRAR_FORNECEDOR == valor)
                {
                    TelaFornecedor.Chamar();
                }
                else if (SAIR == valor)
                {
                    break;
                }
                else
                {
                    Console.WriteLine("Opção inválida.");
                }
            }
        }//MENU FIM