public static void ProcessRADSampleJob()
        {
            RADSampleTableAdapter sample = new RADSampleTableAdapter();

            lims = new LIMSDB();
            sample.Fill(lims.RADSample);
            int           i = 1;
            RADSample     objSample;
            StringBuilder sampleCollection = new StringBuilder();
            StringBuilder resultCollection = new StringBuilder();
            string        path             = string.Format(@"{0}\RAD_XMLSampling-{1}-{2}-{3}-{4}-{5}.xml", Properties.Settings.Default.OutputPath, DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute);

            foreach (RADSampleRow sampleRow in lims.RADSample.Rows)
            {
                objSample = new RADSample(sampleRow, i);
                sampleCollection.Append(objSample.FetchSampleXML());
                ProcessSample(sampleRow, resultCollection);
            }
            var str = string.Format(xmlDocFormat, "SCRAD", "STATE", sampleCollection.ToString(), resultCollection.ToString());

            File.WriteAllText(path, str);
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            //ProcessRADSamples.ProcessRADSampleJob();
            SAMPLETableAdapter SAMPLE = new SAMPLETableAdapter();

            lims = new LIMSDB();
            SAMPLE.Fill(lims.SAMPLE);
            int        i      = 1;
            LIMSSample sample = null;
            string     path   = string.Format(@"{0}\XMLSampling-{1}-{2}-{3}-{4}-{5}.xml", Properties.Settings.Default.OutputPath, DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute);

            StringBuilder sampleCollection = new StringBuilder();
            StringBuilder resultCollection = new StringBuilder();

            foreach (SAMPLERow v in lims.SAMPLE.Rows)
            {
                sample = new LIMSSample(v, i);
                sampleCollection.Append(sample.FetchSampleXML());
                ProcessSample(v, resultCollection);
            }
            var str = string.Format(xmlDocFormat, "40201", "STATE", sampleCollection.ToString(), resultCollection.ToString());

            File.WriteAllText(path, str);
        }