Quickstarts.HistoricalEvents.Server.ReportGenerator.GenerateFluidLevelTestReport C# (CSharp) Method

GenerateFluidLevelTestReport() public method

public GenerateFluidLevelTestReport ( ) : DataRow
return System.Data.DataRow
        public DataRow GenerateFluidLevelTestReport()
        {
            DataRow row = m_dataset.Tables[0].NewRow();

            row[0] = Guid.NewGuid().ToString();
            row[1] = DateTime.UtcNow;

            int index = GetRandom(0, s_WellUIDs.Length - 1);
            row[2] = s_WellNames[index];
            row[3] = s_WellUIDs[index];

            row[4] = DateTime.UtcNow.AddHours(-GetRandom(0, 10));
            row[5] = GetRandom(s_TestReasons);
            row[6] = GetRandom(0, 1000);
            row[7] = GetRandom(s_UnitLengths);
            row[8] = GetRandom(s_Testers);
           
            m_dataset.Tables[0].Rows.Add(row);
            m_dataset.AcceptChanges();

            return row;
        }

Usage Example

コード例 #1
0
ファイル: Program.cs プロジェクト: simple555a/ModifiedStack
        static void Main()
        {
            ReportGenerator g = new ReportGenerator();

            g.Initialize();
            g.GenerateFluidLevelTestReport();
            g.GenerateFluidLevelTestReport();
            g.GenerateFluidLevelTestReport();

            // Initialize the user interface.
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ApplicationInstance.MessageDlg = new ApplicationMessageDlg();
            ApplicationInstance application = new ApplicationInstance();

            application.ApplicationType   = ApplicationType.Server;
            application.ConfigSectionName = "HistoricalEventsServer";

            try
            {
                // process and command line arguments.
                if (application.ProcessCommandLine())
                {
                    return;
                }

                // check if running as a service.
                if (!Environment.UserInteractive)
                {
                    application.StartAsService(new HistoricalEventsServer());
                    return;
                }

                // load the application configuration.
                application.LoadApplicationConfiguration(false).Wait();

                // check the application certificate.
                application.CheckApplicationInstanceCertificate(false, 0).Wait();

                // start the server.
                application.Start(new HistoricalEventsServer()).Wait();

                // run the application interactively.
                Application.Run(new ServerForm(application));
            }
            catch (Exception e)
            {
                ExceptionDlg.Show(application.ApplicationName, e);
                return;
            }
        }
All Usage Examples Of Quickstarts.HistoricalEvents.Server.ReportGenerator::GenerateFluidLevelTestReport