Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XUTMD1

XUTMD1.m

Go to the documentation of this file.
  1. XUTMD1 ;SEA/RDS - TaskMan: Option, XUTMDEL, Part 2 (Bulk Delete) ;1/31/96 10:15
  1. ;;8.0;KERNEL;**20**;Jul 10, 1995
  1. ;
  1. COUNT ;Ask Whether To First Count The Number Of Tasks To Delete
  1. W !
  1. K DIR
  1. S DIR(0)="Y",DIR("B")="YES"
  1. S DIR("A")="Would you like to know how many tasks in that list can be deleted"
  1. S DIR("?")=" Answer NO if you don't want to know how many tasks can be deleted."
  1. D ^DIR
  1. I $D(DIRUT) W:$D(DTOUT) $C(7) W !!?5,"NO tasks deleted!" Q
  1. K DIR,DIRUT,DTOUT,DUOUT
  1. I 'Y G SHOW
  1. S XUTMT(0)="LD" D ^XUTMT G:$D(DIRUT) EXIT
  1. W !!?5,"There ",$S(ZTSK=1:"is ",1:"are "),ZTSK," task",$S(ZTSK=1:"",1:"s")," in that list that can be deleted."
  1. I ZTSK=0 W $C(7) Q
  1. ;
  1. SHOW ;Ask Whether To Show The Tasks To Be Deleted
  1. W !
  1. K DIR
  1. S DIR(0)="Y",DIR("B")="YES"
  1. S DIR("A")="Would you like to see the tasks that will be deleted"
  1. S DIR("?")=" Answer NO if you don't want to see the tasks that will be deleted."
  1. D ^DIR
  1. I $D(DIRUT) W:$D(DTOUT) $C(7) W !!?5,"NO tasks deleted!" Q
  1. K DIR,DIRUT,DTOUT,DUOUT
  1. I 'Y G CONFIRM
  1. W ! S XUTMT(0)="PD" D ^XUTMT
  1. I 'ZTSK W !?5,"There are 0 tasks in that list." Q
  1. ;
  1. CONFIRM ;Prompt For Confirmation Of Deletion
  1. K DIR
  1. S DIR(0)="Y",DIR("B")="NO"
  1. S DIR("A")="Are you sure you want to delete these tasks"
  1. S DIR("?")=" Answer YES to delete the selected tasks."
  1. D ^DIR
  1. I 'Y W !!?5,"Tasks NOT deleted!" W:$D(DTOUT) $C(7) G EXIT
  1. S XUTMT(0)="DL" D ^XUTMT
  1. I ZTSK W !!?5,"Tasks deleted!"
  1. I 'ZTSK W !!?5,"There are 0 tasks in that list."
  1. ;
  1. EXIT Q