Esempio n. 1
0
File: Srq.cs Progetto: rafalad/myEDI
        public void newSRQ()
        {
            Kit set = new Kit();

            Console.WriteLine("\n");
            set.CreateDirEDI();

            Console.ForegroundColor = ConsoleColor.Gray;
            Console.SetWindowSize(100, 30);
            Console.SetBufferSize(100, 30);

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("\n");
            Console.WriteLine(@"FYI: All objects will be created in C:\EDI");
            Console.ResetColor();
            Console.Write("\nEnter the SRQ number you are working on: ");
            string srq_no = Console.ReadLine();
            long   int_no;

            bool convert = long.TryParse(srq_no, out int_no);

            if (!convert)
            {
                //jezeli nie wprowadzono liczby
                Console.WriteLine("\nEnter numbers, not letters.");
                Srq srq = new Srq();
                srq.newSRQ();
            }

            else
            {
                // jezeli wprowadzono liczbe
                set.CreateDirSRQ(int_no);
            }
        }
Esempio n. 2
0
        //Metoda nadająca nazewnictwo RT dla katalogu obiektów z SRQ, wywoływana przez Srq.cs tylko wtedy gdy user poda nr jako typ numeryczny long (parametr).
        public void CreateDirSRQ(long int_no)
        {
            Srq srq1 = new Srq();

            Console.Write("\nEnter the ID (e.g. customer name) of the ticket: ");
            string srq_id = Console.ReadLine();

            string folder_name = "DSV_SRQ" + int_no + "_" + srq_id + "_1.0_rt";
            string folder_path = Path.Combine(@"C:\EDI", folder_name);

            Directory.CreateDirectory(folder_path);

            Colors colors = new Colors();

            colors.doColorFolder();
            Console.ForegroundColor = ConsoleColor.Green;

            Console.WriteLine(folder_path);
            Console.ResetColor();
            Console.WriteLine("\nPress any key to open the directory and exit to the main menu....");
            Console.ReadLine();
            Process.Start(@"C:\EDI");
            //srq1.Back();
        }