コード例 #1
0
ファイル: Program.cs プロジェクト: dreamiurg/gad
        static void Main(string[] args)
        {
            try
             {
            var options = new Options();
            ICommandLineParser parser = new CommandLineParser();
            if (parser.ParseArguments(args, options))
            {
               SiebelDB sdb = new SiebelDB(options);
               var atts = sdb.GetDefectAttachments(options.Number);

               if (atts != null && atts.Count() > 0)
               {
                  Console.WriteLine(@"@echo off");
                  Console.WriteLine();
                  foreach (var att in atts)
                  {
                     Console.WriteLine(@"echo -- Copying {0}", att.FileNameFull);
                     Console.WriteLine(@"copy ""{0}S_DEFECT_ATT_{1}_{2}.SAF"" ""{3}.saf"" /z",
                         options.RemotePath, att.RowID, att.Revision, att.FileNameFull);
                     Console.WriteLine(@"sseunzip.exe 2>nul ""{0}.saf"" ""{0}""",
                         att.FileNameFull);
                     Console.WriteLine(@"echo -- Done {0}", att.FileNameFull);
                     Console.WriteLine();
                  }
               }
               else
               {
                  Console.Error.Write("No such defects or no attachments.");
               }
            }
            else
            {
               Console.Error.Write(options.GetUsage());
            }

             }
             catch (System.Exception ex)
             {
            Console.WriteLine(ex.Message);
             }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: dreamiurg/gad
        static void Main(string[] args)
        {
            try
            {
                var options = new Options();
                ICommandLineParser parser = new CommandLineParser();
                if (parser.ParseArguments(args, options))
                {
                    SiebelDB sdb  = new SiebelDB(options);
                    var      atts = sdb.GetDefectAttachments(options.Number);

                    if (atts != null && atts.Count() > 0)
                    {
                        Console.WriteLine(@"@echo off");
                        Console.WriteLine();
                        foreach (var att in atts)
                        {
                            Console.WriteLine(@"echo -- Copying {0}", att.FileNameFull);
                            Console.WriteLine(@"copy ""{0}S_DEFECT_ATT_{1}_{2}.SAF"" ""{3}.saf"" /z",
                                              options.RemotePath, att.RowID, att.Revision, att.FileNameFull);
                            Console.WriteLine(@"sseunzip.exe 2>nul ""{0}.saf"" ""{0}""",
                                              att.FileNameFull);
                            Console.WriteLine(@"echo -- Done {0}", att.FileNameFull);
                            Console.WriteLine();
                        }
                    }
                    else
                    {
                        Console.Error.Write("No such defects or no attachments.");
                    }
                }
                else
                {
                    Console.Error.Write(options.GetUsage());
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }