예제 #1
0
        public void PrintClient(clsAbsClients client)
        {
            int  i    = 0;
            bool flag = true;

            while (flag)
            {
                try
                {
                    StreamWriter ar = new StreamWriter(@"C:\Users\Cesar\source\repos\ConsoleApp7\FileBinnacle.log", true);
                    ar.WriteLine(client.Pin + " " + client.Name);
                    if (client.RegimentType == 1)
                    {
                        ar.WriteLine("Type: Physical Person");
                    }
                    else
                    {
                        ar.WriteLine("Type: Morar Person");
                    }
                    ar.WriteLine("RFC: " + client.RFC);
                    ar.Close();
                    flag = false;
                }
                catch (Exception e)
                {
                    i++;
                    if (i >= 1000)
                    {
                        throw e;
                    }
                }
            }
        }
예제 #2
0
 public void PrintClient(clsAbsClients client)
 {
     Console.WriteLine();
     Console.WriteLine();
     Console.WriteLine();
     Console.WriteLine(client.Pin + " " + client.Name);
     if (client.RegimentType == 1)
     {
         Console.WriteLine("Type: PHYSICAL PERSON");
     }
     else
     {
         Console.WriteLine("Type: MORAL PERSON");
     }
     Console.WriteLine(client.RFC);
     Console.ReadKey();
 }