home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
drscorpobj.tcl
< prev
next >
Wrap
Text File
|
1997-08-29
|
2KB
|
92 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)drscorpobj.tcl /main/titanic/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)drscorpobj.tcl /main/titanic/4 29 Aug 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 ${DrsDriver::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 ${DrsDriver::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 ${DrsDriver::FORMALMODULE}_${pr}_ids
set remInd [lsearch $childs $pr]
set childs [lreplace $childs $remInd $remInd]
$levelObj setProperty ${DrsDriver::FORMALMODULE}_SelectedItems $childs
}
}
method DrsCorpObject::deleteObject {this} {
}
method DrsCorpObject::filter {this majorOper minorOper} {
}
# Do not delete this line -- regeneration end marker