- Timestamp:
- 04/08/10 11:35:52 (14 years ago)
- Location:
- trunk/desktop
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/ICSSerialPort.rbbas
r20 r21 328 328 #tag Method, Flags = &h0 329 329 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 340 352 end if 341 342 rs.Close343 344 status = createProfile(theName)345 353 End Sub 346 354 #tag EndMethod -
trunk/desktop/mainWindow.rbfrm
r19 r21 138 138 Top = 32 139 139 Underline = "" 140 Value = 3140 Value = 1 141 141 Visible = True 142 142 Width = 637 … … 3226 3226 Sub Action() 3227 3227 ICSSerialPort1.deleteProfile(PopupMenu_Profile.Text) 3228 3229 PopupMenu_Profile.RemoveRow(PopupMenu_Profile.ListIndex) 3230 3231 //Make sure to hide the save and delete profile buttons since no profile will be selected after this has been deleted 3232 PushButton_SaveProfile.Visible = False 3233 PushButton_Delete.Visible = False 3228 3234 End Sub 3229 3235 #tag EndEvent
Note: See TracChangeset
for help on using the changeset viewer.