Ignore:
Timestamp:
04/08/10 11:35:52 (15 years ago)
Author:
pinwc4
Message:

Added logic to hide save and delete profile buttons after a profile has been deleted and removed from the menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/ICSSerialPort.rbbas

    r20 r21  
    328328        #tag Method, Flags = &h0 
    329329                Sub saveProfile(theName as String) 
    330                   dim rs as RecordSet 
    331                   dim status as Boolean 
    332                    
    333                   //Find a record 
    334                   rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
    335                    
    336                   //Make sure we got a record 
    337                   if rs <> nil then 
    338                     //delete the record before saving 
    339                     deleteProfile(theName) 
     330                  if theName <> "" then 
     331                     
     332                    dim rs as RecordSet 
     333                    dim status as Boolean 
     334                     
     335                    //Find a record 
     336                    rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
     337                     
     338                    //Make sure we got a record 
     339                    if rs <> nil then 
     340                      //delete the record before saving 
     341                      deleteProfile(theName) 
     342                    end if 
     343                     
     344                    rs.Close 
     345                     
     346                    status = createProfile(theName) 
     347                     
     348                  else 
     349                     
     350                    MsgBox "Please select a profile to modify" 
     351                     
    340352                  end if 
    341                    
    342                   rs.Close 
    343                    
    344                   status = createProfile(theName) 
    345353                End Sub 
    346354        #tag EndMethod 
Note: See TracChangeset for help on using the changeset viewer.