home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
drscorpobj.tcl
< prev
next >
Wrap
Text File
|
1997-02-04
|
2KB
|
92 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)drscorpobj.tcl /main/hindenburg/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)drscorpobj.tcl /main/hindenburg/4 4 Feb 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "drslevelob.tcl"
#Class DrsCorpObject : {DrsLevelObject} {
# method destructor
# constructor
# method install
# method synObjects
# method deleteObject
# method filter
#}
method DrsCorpObject::destructor {this} {
# Start destructor user section
# End destructor user section
$this DrsLevelObject::destructor
}
constructor DrsCorpObject {class this corp} {
set this [DrsLevelObject::constructor $class $this $corp "" "" ""]
$this childLevels [$corp projects]
return $this
}
method DrsCorpObject::install {this} {
return "1"
}
method DrsCorpObject::synObjects {this} {
return "1"
[.main messageArea] message "synchronizing corporate"
set levelObj [$this level]
set projects [$levelObj projects]
set childs [$levelObj getPropertyValue ${FORMALMODULE}_SelectedItems]
foreach pr $childs {
set dxlCommand [$this getDxlCommand]
set toSend 0
set toSynch 1
foreach project $projects {
if {$pr == [$project name]} {
set toSynch 0
break
}
}
if !$toSynch {
continue
}
set objIds [$levelObj getPropertyValue ${FORMALMODULE}_${pr}_ids]
foreach doorsObjId $objIds {
set toSend 1
set searchObject [$dxlCommand doorsObjectFind $doorsObjId]
$dxlCommand doorsObjectDelete $searchObject
}
if !$toSend {
continue
}
$dxlCommand doorsResultSave "1"
set dxlResult [$this sendDxlCommand]
if {$dxlResult <= 0 } {
wmtkinfo "Operation on corporate canceled"
return
}
$levelObj removeProperty ${FORMALMODULE}_${pr}_ids
set remInd [lsearch $childs $pr]
set childs [lreplace $childs $remInd $remInd]
$levelObj setProperty ${FORMALMODULE}_SelectedItems $childs
}
}
method DrsCorpObject::deleteObject {this} {
}
method DrsCorpObject::filter {this majorOper minorOper} {
}
# Do not delete this line -- regeneration end marker