Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. myapp.BrowseTableSet.deleteSelectedItem_canExecute = function (screen) {
  2.     // Write code here.
  3.    
  4.    
  5.     return screen.TableSet.selectedItem !== null;
  6.  
  7. };
  8.  
  9.  
  10.  
  11. myapp.BrowseTableSet.deleteSelectedItem_execute = function (screen) {
  12.     // Delete selected
  13.    
  14.     screen.TableSet.deleteSelected();
  15.  
  16.     // Save changes
  17.     myapp.commitChanges().then(function success() {
  18.         // If success.
  19.         window.location.reload();
  20.        
  21.         //msls.showMessageBox("Delete is successfull.", { title: "Delete" });
  22.     }, function fail(e) {
  23.         // If error occurs,
  24.         msls.showMessageBox(e.message, { title: e.title }).then(function () {
  25.             // Cancel Changes
  26.             myapp.cancelChanges();
  27.         });
  28.     })
  29.     //screen.BrowseTableSet.refresh();
  30.    
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement