Example #1
0
        private void AtualizarMercadoFinanceiro()
        {
            MerFin merFin = new MerFin();

            Console.WriteLine("Insert Unique Code of Mercado Financeiro to Update");
            merFin.cod_un = Int32.Parse(Console.ReadLine());
            string src = "";

            Console.WriteLine("Do you want to update the name of Mercado Financeiro?(Y/N)");
            src = Console.ReadLine();
            if (src.ToUpper().Contains("Y"))
            {
                Console.WriteLine("Insert the new name");
                merFin.nome = Console.ReadLine();
            }
            Console.WriteLine("Do you want to update the description of Mercado Financeiro?(Y/N)");
            src = Console.ReadLine();
            if (src.ToUpper().Contains("Y"))
            {
                Console.WriteLine("Insert the new description");
                merFin.descrição = Console.ReadLine();
            }
            MerFinMapper mapper = new MerFinMapper();

            if (mapper.Update(merFin) > 0)
            {
                Console.WriteLine("SUCCESS");
            }
            else
            {
                Console.WriteLine("UNSUCCESS");
            }
        }
Example #2
0
        private void RemoverMercadoFinanceiro()
        {
            MerFin merFin = new MerFin();

            Console.WriteLine("Insert Unique Code of Mercado Financeiro to REMOVE");
            merFin.cod_un = Int32.Parse(Console.ReadLine());
            MerFinMapper mapper = new MerFinMapper();

            if (mapper.Delete(merFin) > 0)
            {
                Console.WriteLine("SUCCESS");
            }
            else
            {
                Console.WriteLine("UNSUCCESS");
            }
        }
Example #3
0
        private void InserirMercadoFinanceiro()
        {
            MerFin merFin = new MerFin();

            Console.WriteLine("Insert Unique Code of Mercado Financeiro");
            merFin.cod_un = Int32.Parse(Console.ReadLine());
            Console.WriteLine("Insert Name of Mercado Financeiro");
            merFin.nome = Console.ReadLine();
            Console.WriteLine("Insert Description of Mercado Financeiro");
            merFin.descrição = Console.ReadLine();
            MerFinMapper mapper = new MerFinMapper();

            if (mapper.Create(merFin) > 0)
            {
                Console.WriteLine("SUCCESS");
            }
            else
            {
                Console.WriteLine("UNSUCCESS");
            }
        }