Exemple #1
0
 public void ProcessADCStatusFiles()
 {
     string[] files = Directory.GetFiles(ADCStatus);
     foreach (string file in files)
     {
         string fileNameWithExtension = Path.GetFileName(file);
         try
         {
             TransmissionApiCalls.PostBatchStatusXMLFile(file);
             if (File.Exists(ADCStatusArchive + fileNameWithExtension))
             {
                 File.Delete(ADCStatusArchive + fileNameWithExtension);
             }
             File.Move(file, ADCStatusArchive + fileNameWithExtension);
         }
         catch (Exception ex)
         {
             if (File.Exists(ADCStatusException + fileNameWithExtension))
             {
                 File.Delete(ADCStatusException + fileNameWithExtension);
             }
             File.Move(file, ADCStatusException + fileNameWithExtension);
         }
     }
 }
Exemple #2
0
 public void ProcessSplitFromADCFiles()
 {
     string[] files = Directory.GetFiles(SplitFromADC);
     foreach (string file in files)
     {
         //string fileExtension = Path.GetExtension(file);
         string fileNameWithExtension = Path.GetFileName(file);
         //string fileName = Path.GetFileNameWithoutExtension(file);
         try
         {
             TransmissionApiCalls.PostFile(file);
             if (File.Exists(SplitFromADCArchive + fileNameWithExtension))
             {
                 File.Delete(SplitFromADCArchive + fileNameWithExtension);
             }
             File.Move(file, SplitFromADCArchive + fileNameWithExtension);
         }
         catch (Exception ex)
         {
             if (File.Exists(SplitFromADCException + fileNameWithExtension))
             {
                 File.Delete(SplitFromADCException + fileNameWithExtension);
             }
             try
             {
                 File.Move(file, SplitFromADCException + fileNameWithExtension);
             }
             catch (Exception exSub)
             {
             }
         }
     }
 }
Exemple #3
0
        private void btnPostFiles_Click(object sender, EventArgs e)
        {
            string FromADC = ConfigurationManager.AppSettings["FromADC"].ToString();

            string[] files = Directory.GetFiles(FromADC);
            foreach (string file in files)
            {
                string postUrl = file;
                TransmissionApiCalls.PostFile(postUrl);
            }
        }
Exemple #4
0
 public void ProcessSplitFromADCFiles()
 {
     string[] files = Directory.GetFiles(SplitFromADC);
     foreach (string file in files)
     {
         //string fileExtension = Path.GetExtension(file);
         string fileNameWithExtension = Path.GetFileName(file);
         //string fileName = Path.GetFileNameWithoutExtension(file);
         TransmissionApiCalls.PostFile(file);
         File.Move(file, SplitFromADCArchive + fileNameWithExtension);
     }
 }