Difference between revisions of "ProcessShellRequest"

From RayHarwood
Jump to: navigation, search
(Created page with "When doing a command line argument setup, here is code for processing the request: Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As Stri...")
 
 
Line 1: Line 1:
−
When doing a command line argument setup, here is code for processing the request:
+
When doing a [[Batch Mode and Command-Line Arguments]] setup, here is code for processing the request.  Each case selector calls the routine that actually does the work.  I typically build the work-code from an interactive GUI form with buttons, then strip the work-code from the button handler, place into a sub, call the sub from the button handler '''and''' from the ProcessShellRequest below.  That way, I can run the code in a batch file, but also still run it from the GUI if I need to do some "manual processing."
  
 
     Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As String) As ShellResult
 
     Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As String) As ShellResult
Line 27: Line 27:
 
         Console.WriteLine("Shell request = " & ShellRequest)
 
         Console.WriteLine("Shell request = " & ShellRequest)
 
         Select Case ShellRequest
 
         Select Case ShellRequest
 +
            ' Some items removed from examples...
 
             Case "db", "database"
 
             Case "db", "database"
 
                 LogDBinfo()
 
                 LogDBinfo()
Line 33: Line 34:
 
                 My.Settings.ITSec_ConnString_RunTime = My.Settings.ITSec_Test_ConnString
 
                 My.Settings.ITSec_ConnString_RunTime = My.Settings.ITSec_Test_ConnString
 
                 LogDBinfo()
 
                 LogDBinfo()
−
            Case "update_chn_managers"
 
−
                Dim MyMgrUpdate As New CHN_Staff_MgrUpdate(LogFile)
 
−
                MyMgrUpdate.Process_CHN_Staff_Managers()
 
−
            Case "update_cmg_managers"
 
−
                Dim MyMgrUpdate As New CMG_Staff_MgrUpdate(LogFile)
 
−
                MyMgrUpdate.Process_CMG_Staff_Managers()
 
−
            Case "send_queue_reminders"
 
−
                SendQueueReminders_New_V2(LogFile)
 
 
             Case "send_email_notices"
 
             Case "send_email_notices"
 
                 Dim SEN As New EmailNotices
 
                 Dim SEN As New EmailNotices
 
                 SEN.Send_Email_Notices(LogFile)
 
                 SEN.Send_Email_Notices(LogFile)
−
            Case "run_status_updates"
 
−
                RunBothStatusUpdates(LogFile)
 
−
            Case "scan_for_exceptions"
 
−
                Dim ExcScan As New ExceptionScanner(LogFile)
 
−
                ExcScan.Scan_For_All_Exceptions()
 
−
            Case "set_update_flag"
 
−
                Process_Set_Update_Flag(ArgArray)
 
 
             Case "get_active_imports", "run_active_imports"
 
             Case "get_active_imports", "run_active_imports"
 
                 Process_Run_Active_Imports(ArgArray)
 
                 Process_Run_Active_Imports(ArgArray)
−
            Case "run_import"
 
−
                Process_Run_Import(ArgArray)
 
−
            Case "copy_safdb"
 
−
                Process_Copy_SAFDB()
 
−
            Case "get_exchange_info"
 
−
                Process_Get_Exchange_Info(ArgArray)
 
 
             Case "get_ad_account_info"
 
             Case "get_ad_account_info"
 
                 Process_Get_AD_Account_Info(ArgArray)
 
                 Process_Get_AD_Account_Info(ArgArray)

Latest revision as of 14:03, 26 April 2013

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox