sub show_amend_userorderroute() { my $frame = $mainmenu->Toplevel(-title => 'Amend User',); # make a $frame->geometry ('+100+400'); # Widget Initialization # Widget Initialization our($_frame_1) = $frame->Frame( ); our($_frame_2) = $frame->Frame( ); our($_frame_3) = $frame->Frame( ); our($amufirstlab) = $frame->Label( -activeforeground => '#990000', -font => '{MS Sans Serif} 8 bold', -foreground => '#990000', -text => 'Complex Trading admin ( Amend Order Routing )', ); our($amuseclb) = $frame->Label( -activeforeground => '#000099', -foreground => '#000099', -text => 'Select Fix / Fastfix for user routing', ); our($amalbuid) = $frame->Label(-text => 'Userid',); our($amuuserid) = $frame->Entry(); our($amarolenamelb) = $frame->Label(-text => 'Function',); our($amurolename) = $frame->Spinbox(-values => "add remove", ); our($amalbfunct) = $frame->Label(-text => 'Order Routing',); our($btsubmit) = $frame->Button(-text => 'Submit',); our($btcancel) = $frame->Button(-text => 'Cancel',); our($_text_4) = $frame->Text(-height => '0',-width => '0',); our($amufunction) = $frame->Spinbox(-values => 'exchangelink fastfix',); # widget commands $btsubmit->configure(-command => sub {process_amend_userorderroute( $amuuserid, $amurolename, $amufunction, $frame);}); $btcancel->configure( -command => sub {$frame->destroy;} ); # Geometry Management $_frame_1->grid( -in => $frame, -column => '1', -row => '1', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => 'news' ); $_frame_2->grid( -in => $frame, -column => '1', -row => '2', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => 'news' ); $_frame_3->grid( -in => $frame, -column => '1', -row => '3', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => 'news' ); $amufirstlab->grid( -in => $_frame_1, -column => '1', -row => '1', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $amuseclb->grid( -in => $_frame_1, -column => '1', -row => '2', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $amalbuid->grid( -in => $_frame_2, -column => '1', -row => '1', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $amuuserid->grid( -in => $_frame_2, -column => '2', -row => '1', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $amarolenamelb->grid( -in => $_frame_2, -column => '1', -row => '2', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $amurolename->grid( -in => $_frame_2, -column => '2', -row => '2', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $amalbfunct->grid( -in => $_frame_2, -column => '1', -row => '3', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $btsubmit->grid( -in => $_frame_3, -column => '1', -row => '1', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $btcancel->grid( -in => $_frame_3, -column => '2', -row => '1', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); $_text_4->grid( -in => $frame, -column => '1', -row => '4', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => 'news' ); $amufunction->grid( -in => $_frame_2, -column => '2', -row => '3', -columnspan => '1', -ipadx => '0', -ipady => '0', -padx => '0', -pady => '0', -rowspan => '1', -sticky => '' ); # Resize Behavior $frame->gridRowconfigure(1, -weight => 0, -minsize => 36, -pad => 0); $frame->gridRowconfigure(2, -weight => 0, -minsize => 40, -pad => 0); $frame->gridRowconfigure(3, -weight => 0, -minsize => 40, -pad => 0); $frame->gridRowconfigure(4, -weight => 0, -minsize => 40, -pad => 0); $frame->gridColumnconfigure(1, -weight => 0, -minsize => 40, -pad => 0); $_frame_1->gridRowconfigure(1, -weight => 0, -minsize => 29, -pad => 0); $_frame_1->gridRowconfigure(2, -weight => 0, -minsize => 20, -pad => 0); $_frame_1->gridColumnconfigure(1, -weight => 0, -minsize => 40, -pad => 0); $_frame_2->gridRowconfigure(1, -weight => 0, -minsize => 40, -pad => 0); $_frame_2->gridRowconfigure(2, -weight => 0, -minsize => 40, -pad => 0); $_frame_2->gridRowconfigure(3, -weight => 0, -minsize => 40, -pad => 0); $_frame_2->gridColumnconfigure(1, -weight => 0, -minsize => 40, -pad => 0); $_frame_2->gridColumnconfigure(2, -weight => 0, -minsize => 40, -pad => 0); $_frame_3->gridRowconfigure(1, -weight => 0, -minsize => 40, -pad => 0); $_frame_3->gridColumnconfigure(1, -weight => 0, -minsize => 40, -pad => 0); $_frame_3->gridColumnconfigure(2, -weight => 0, -minsize => 40, -pad => 0); # Display a table with all the user order routing, that is on the correlator # this table is held in the database, and then that info is kept for logging and # Audit the real information is kept on the correaltor in the Logon.evt file. my $sql = qq{SELECT userid,orderrouting FROM apama_owner.user_routing}; my $tb = Text::Table->new("User Name", "Routing"); my $sth = $dbh->prepare($sql); $sth->execute(); my($username,$routing); $sth->bind_columns( undef, \$username, \$routing); my $ucount = 3; while($sth->fetch() ) { $ucount++; $tb->load(["$username", "$routing"]); } $sth->finish(); # Create a txt box so that we can print the outputs # to the users screen. $txt = $_text_4-> Scrolled('Text', -width => 40, -height => $ucount, -scrollbars=>'e') -> pack (); $txt->insert('end',$tb); # End order routine table. }