home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1998 October / dpcb1098.iso / Business / Maxim / MAX5 / data.z / oms.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-05-15  |  37.9 KB  |  1,125 lines

  1. VERSION 5.00
  2. Begin VB.Form omsForm 
  3.    Caption         =   "OMS"
  4.    ClientHeight    =   7290
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   9375
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   7290
  10.    ScaleWidth      =   9375
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command34 
  13.       Caption         =   "RoleStanding"
  14.       Height          =   372
  15.       Left            =   5400
  16.       TabIndex        =   51
  17.       Top             =   6720
  18.       Width           =   1935
  19.    End
  20.    Begin VB.CommandButton Command33 
  21.       Caption         =   "FactorStanding"
  22.       Height          =   372
  23.       Left            =   5400
  24.       TabIndex        =   50
  25.       Top             =   6360
  26.       Width           =   1935
  27.    End
  28.    Begin VB.CommandButton Command32 
  29.       Caption         =   "RoleStandingLink"
  30.       Height          =   372
  31.       Left            =   7560
  32.       TabIndex        =   49
  33.       Top             =   6720
  34.       Width           =   1695
  35.    End
  36.    Begin VB.CommandButton Command31 
  37.       Caption         =   "FactorStandingLink"
  38.       Height          =   372
  39.       Left            =   7560
  40.       TabIndex        =   48
  41.       Top             =   6360
  42.       Width           =   1695
  43.    End
  44.    Begin VB.CommandButton Command30 
  45.       Caption         =   "StepActivityLink"
  46.       Height          =   372
  47.       Left            =   7560
  48.       TabIndex        =   47
  49.       Top             =   6000
  50.       Width           =   1695
  51.    End
  52.    Begin VB.CommandButton Command28 
  53.       Caption         =   "StrategyStepLink"
  54.       Height          =   372
  55.       Left            =   7560
  56.       TabIndex        =   46
  57.       Top             =   5280
  58.       Width           =   1695
  59.    End
  60.    Begin VB.CommandButton Command27 
  61.       Caption         =   "StrategyFactorLink"
  62.       Height          =   372
  63.       Left            =   7560
  64.       TabIndex        =   45
  65.       Top             =   4920
  66.       Width           =   1695
  67.    End
  68.    Begin VB.CommandButton Command26 
  69.       Caption         =   "StrategyRoleLink"
  70.       Height          =   372
  71.       Left            =   7560
  72.       TabIndex        =   44
  73.       Top             =   4560
  74.       Width           =   1695
  75.    End
  76.    Begin VB.CommandButton Command25 
  77.       Caption         =   "Activity"
  78.       Height          =   372
  79.       Left            =   5400
  80.       TabIndex        =   43
  81.       Top             =   6000
  82.       Width           =   1935
  83.    End
  84.    Begin VB.CommandButton Command24 
  85.       Caption         =   "Step"
  86.       Height          =   372
  87.       Left            =   5400
  88.       TabIndex        =   42
  89.       Top             =   5640
  90.       Width           =   1935
  91.    End
  92.    Begin VB.CommandButton Command23 
  93.       Caption         =   "Factor"
  94.       Height          =   372
  95.       Left            =   5400
  96.       TabIndex        =   41
  97.       Top             =   5280
  98.       Width           =   1935
  99.    End
  100.    Begin VB.CommandButton Command22 
  101.       Caption         =   "Role"
  102.       Height          =   372
  103.       Left            =   5400
  104.       TabIndex        =   40
  105.       Top             =   4920
  106.       Width           =   1935
  107.    End
  108.    Begin VB.CommandButton Command21 
  109.       Caption         =   "FactorStanding"
  110.       Height          =   372
  111.       Left            =   7560
  112.       TabIndex        =   37
  113.       Top             =   2280
  114.       Width           =   1692
  115.    End
  116.    Begin VB.CommandButton Command20 
  117.       Caption         =   "NextFactor"
  118.       Height          =   372
  119.       Left            =   5400
  120.       TabIndex        =   32
  121.       Top             =   3360
  122.       Width           =   1935
  123.    End
  124.    Begin VB.CommandButton Command19 
  125.       Caption         =   "NextFactorStandingLink"
  126.       Height          =   375
  127.       Left            =   5400
  128.       TabIndex        =   31
  129.       Top             =   3000
  130.       Width           =   1935
  131.    End
  132.    Begin VB.CommandButton Command18 
  133.       Caption         =   "FactorStanding"
  134.       Height          =   372
  135.       Left            =   5400
  136.       TabIndex        =   30
  137.       Top             =   2640
  138.       Width           =   1935
  139.    End
  140.    Begin VB.CommandButton Command17 
  141.       Caption         =   "FirstFactorStandingLink"
  142.       Height          =   372
  143.       Left            =   5400
  144.       TabIndex        =   29
  145.       Top             =   2280
  146.       Width           =   1935
  147.    End
  148.    Begin VB.CommandButton Command16 
  149.       Caption         =   "Last thing to do before Exit"
  150.       Height          =   492
  151.       Left            =   5520
  152.       TabIndex        =   28
  153.       Top             =   120
  154.       Width           =   2532
  155.    End
  156.    Begin VB.CommandButton Command15 
  157.       Caption         =   "First thing to do before OMS"
  158.       Height          =   492
  159.       Left            =   1200
  160.       TabIndex        =   27
  161.       Top             =   120
  162.       Width           =   2532
  163.    End
  164.    Begin VB.CommandButton Command14 
  165.       Caption         =   "Strategy"
  166.       Height          =   375
  167.       Left            =   5400
  168.       TabIndex        =   26
  169.       Top             =   4560
  170.       Width           =   1935
  171.    End
  172.    Begin VB.CommandButton Command13 
  173.       Caption         =   "FactorStanding"
  174.       Height          =   375
  175.       Left            =   7560
  176.       TabIndex        =   25
  177.       Top             =   3360
  178.       Width           =   1692
  179.    End
  180.    Begin VB.CommandButton Command12 
  181.       Caption         =   "Factor"
  182.       Height          =   375
  183.       Left            =   7560
  184.       TabIndex        =   24
  185.       Top             =   1920
  186.       Width           =   1692
  187.    End
  188.    Begin VB.CommandButton Command11 
  189.       Caption         =   "FirstFactor"
  190.       Height          =   375
  191.       Left            =   5400
  192.       TabIndex        =   23
  193.       Top             =   1920
  194.       Width           =   1935
  195.    End
  196.    Begin VB.TextBox Text13 
  197.       Height          =   285
  198.       Left            =   3120
  199.       TabIndex        =   22
  200.       Text            =   "Text13"
  201.       Top             =   4560
  202.       Width           =   2055
  203.    End
  204.    Begin VB.TextBox Text12 
  205.       Height          =   285
  206.       Left            =   3120
  207.       TabIndex        =   21
  208.       Text            =   "Text12"
  209.       Top             =   4320
  210.       Width           =   2055
  211.    End
  212.    Begin VB.TextBox Text11 
  213.       Height          =   285
  214.       Left            =   3120
  215.       TabIndex        =   20
  216.       Text            =   "Text11"
  217.       Top             =   4080
  218.       Width           =   2055
  219.    End
  220.    Begin VB.TextBox Text10 
  221.       Height          =   285
  222.       Left            =   3120
  223.       TabIndex        =   19
  224.       Text            =   "Text10"
  225.       Top             =   3840
  226.       Width           =   2055
  227.    End
  228.    Begin VB.TextBox Text9 
  229.       Height          =   285
  230.       Left            =   3120
  231.       TabIndex        =   18
  232.       Text            =   "Text9"
  233.       Top             =   3600
  234.       Width           =   2055
  235.    End
  236.    Begin VB.TextBox Text8 
  237.       Height          =   285
  238.       Left            =   3120
  239.       TabIndex        =   17
  240.       Text            =   "Text8"
  241.       Top             =   3360
  242.       Width           =   2055
  243.    End
  244.    Begin VB.TextBox Text7 
  245.       Height          =   285
  246.       Left            =   3120
  247.       TabIndex        =   16
  248.       Text            =   "Text7"
  249.       Top             =   3120
  250.       Width           =   2055
  251.    End
  252.    Begin VB.TextBox Text6 
  253.       Height          =   285
  254.       Left            =   3120
  255.       TabIndex        =   15
  256.       Text            =   "Text6"
  257.       Top             =   2880
  258.       Width           =   2055
  259.    End
  260.    Begin VB.TextBox Text5 
  261.       Height          =   285
  262.       Left            =   3120
  263.       TabIndex        =   14
  264.       Text            =   "Text5"
  265.       Top             =   2640
  266.       Width           =   2055
  267.    End
  268.    Begin VB.TextBox Text4 
  269.       Height          =   285
  270.       Left            =   3120
  271.       TabIndex        =   13
  272.       Text            =   "Text4"
  273.       Top             =   2400
  274.       Width           =   2055
  275.    End
  276.    Begin VB.TextBox Text3 
  277.       Height          =   285
  278.       Left            =   3120
  279.       TabIndex        =   12
  280.       Text            =   "Text3"
  281.       Top             =   2160
  282.       Width           =   2055
  283.    End
  284.    Begin VB.TextBox Text2 
  285.       Height          =   285
  286.       Left            =   3120
  287.       TabIndex        =   11
  288.       Text            =   "Text2"
  289.       Top             =   1920
  290.       Width           =   2055
  291.    End
  292.    Begin VB.CommandButton Command10 
  293.       Caption         =   "IsFactorStandingNameNotUnique"
  294.       Height          =   375
  295.       Left            =   240
  296.       TabIndex        =   10
  297.       Top             =   4320
  298.       Width           =   2535
  299.    End
  300.    Begin VB.CommandButton Command9 
  301.       Caption         =   "IsRoleStandingNameNotUnique"
  302.       Height          =   375
  303.       Left            =   240
  304.       TabIndex        =   9
  305.       Top             =   3960
  306.       Width           =   2535
  307.    End
  308.    Begin VB.CommandButton Command8 
  309.       Caption         =   "IsFactorNameNotUnique"
  310.       Height          =   375
  311.       Left            =   240
  312.       TabIndex        =   8
  313.       Top             =   3600
  314.       Width           =   2535
  315.    End
  316.    Begin VB.CommandButton Command7 
  317.       Caption         =   "IsRoleNameNotUnique"
  318.       Height          =   375
  319.       Left            =   240
  320.       TabIndex        =   7
  321.       Top             =   3240
  322.       Width           =   2535
  323.    End
  324.    Begin VB.CommandButton Command6 
  325.       Caption         =   "IsActivityNameNotUnique"
  326.       Height          =   375
  327.       Left            =   240
  328.       TabIndex        =   6
  329.       Top             =   2880
  330.       Width           =   2535
  331.    End
  332.    Begin VB.CommandButton Command5 
  333.       Caption         =   "IsStepNameNotUnique"
  334.       Height          =   375
  335.       Left            =   240
  336.       TabIndex        =   5
  337.       Top             =   2520
  338.       Width           =   2535
  339.    End
  340.    Begin VB.CommandButton Command4 
  341.       Caption         =   "Exit OLE Automation"
  342.       Height          =   495
  343.       Left            =   3720
  344.       TabIndex        =   4
  345.       Top             =   360
  346.       Width           =   1812
  347.    End
  348.    Begin VB.TextBox Text1 
  349.       Height          =   285
  350.       Left            =   240
  351.       TabIndex        =   3
  352.       Text            =   "Text1"
  353.       Top             =   1920
  354.       Width           =   2535
  355.    End
  356.    Begin VB.CommandButton Command3 
  357.       Caption         =   "IsStrategyNameNotUnique"
  358.       Height          =   375
  359.       Left            =   240
  360.       TabIndex        =   2
  361.       Top             =   2160
  362.       Width           =   2535
  363.    End
  364.    Begin VB.CommandButton Command2 
  365.       Caption         =   "Close OMS Object"
  366.       Height          =   495
  367.       Left            =   5520
  368.       TabIndex        =   1
  369.       Top             =   600
  370.       Width           =   2535
  371.    End
  372.    Begin VB.CommandButton Command1 
  373.       Caption         =   "Create OMS Object"
  374.       Height          =   495
  375.       Left            =   1200
  376.       TabIndex        =   0
  377.       Top             =   600
  378.       Width           =   2535
  379.    End
  380.    Begin VB.Label Label24 
  381.       Caption         =   "13."
  382.       Height          =   255
  383.       Left            =   2880
  384.       TabIndex        =   69
  385.       Top             =   4560
  386.       Width           =   255
  387.    End
  388.    Begin VB.Label Label23 
  389.       Caption         =   "12."
  390.       Height          =   255
  391.       Left            =   2880
  392.       TabIndex        =   68
  393.       Top             =   4320
  394.       Width           =   255
  395.    End
  396.    Begin VB.Label Label22 
  397.       Caption         =   "11."
  398.       Height          =   255
  399.       Left            =   2880
  400.       TabIndex        =   67
  401.       Top             =   4080
  402.       Width           =   255
  403.    End
  404.    Begin VB.Label Label21 
  405.       Caption         =   "10."
  406.       Height          =   255
  407.       Left            =   2880
  408.       TabIndex        =   66
  409.       Top             =   3840
  410.       Width           =   255
  411.    End
  412.    Begin VB.Label Label20 
  413.       Caption         =   "9."
  414.       Height          =   255
  415.       Left            =   2880
  416.       TabIndex        =   65
  417.       Top             =   3600
  418.       Width           =   255
  419.    End
  420.    Begin VB.Label Label19 
  421.       Caption         =   "8."
  422.       Height          =   255
  423.       Left            =   2880
  424.       TabIndex        =   64
  425.       Top             =   3360
  426.       Width           =   255
  427.    End
  428.    Begin VB.Label Label18 
  429.       Caption         =   "7."
  430.       Height          =   255
  431.       Left            =   2880
  432.       TabIndex        =   63
  433.       Top             =   3120
  434.       Width           =   255
  435.    End
  436.    Begin VB.Label Label17 
  437.       Caption         =   "6."
  438.       Height          =   255
  439.       Left            =   2880
  440.       TabIndex        =   62
  441.       Top             =   2880
  442.       Width           =   255
  443.    End
  444.    Begin VB.Label Label16 
  445.       Caption         =   "5."
  446.       Height          =   255
  447.       Left            =   2880
  448.       TabIndex        =   61
  449.       Top             =   2640
  450.       Width           =   255
  451.    End
  452.    Begin VB.Label Label15 
  453.       Caption         =   "4."
  454.       Height          =   255
  455.       Left            =   2880
  456.       TabIndex        =   60
  457.       Top             =   2400
  458.       Width           =   255
  459.    End
  460.    Begin VB.Label Label14 
  461.       Caption         =   "3."
  462.       Height          =   255
  463.       Left            =   2880
  464.       TabIndex        =   59
  465.       Top             =   2160
  466.       Width           =   255
  467.    End
  468.    Begin VB.Label Label13 
  469.       Caption         =   "2."
  470.       Height          =   255
  471.       Left            =   2880
  472.       TabIndex        =   58
  473.       Top             =   1920
  474.       Width           =   255
  475.    End
  476.    Begin VB.Label Label12 
  477.       Caption         =   "1."
  478.       Height          =   255
  479.       Left            =   0
  480.       TabIndex        =   57
  481.       Top             =   1920
  482.       Width           =   255
  483.    End
  484.    Begin VB.Line Line5 
  485.       X1              =   120
  486.       X2              =   120
  487.       Y1              =   4920
  488.       Y2              =   7200
  489.    End
  490.    Begin VB.Line Line4 
  491.       X1              =   120
  492.       X2              =   5160
  493.       Y1              =   7200
  494.       Y2              =   7200
  495.    End
  496.    Begin VB.Line Line3 
  497.       X1              =   5160
  498.       X2              =   5160
  499.       Y1              =   7200
  500.       Y2              =   4920
  501.    End
  502.    Begin VB.Line Line2 
  503.       X1              =   120
  504.       X2              =   5160
  505.       Y1              =   4920
  506.       Y2              =   4920
  507.    End
  508.    Begin VB.Label Label11 
  509.       Caption         =   "4.  Press the ""Close...Object"" button, then ""Last...Exit"" button before press the ""Exit OLE..."" button."
  510.       BeginProperty Font 
  511.          Name            =   "MS Sans Serif"
  512.          Size            =   8.25
  513.          Charset         =   0
  514.          Weight          =   400
  515.          Underline       =   0   'False
  516.          Italic          =   -1  'True
  517.          Strikethrough   =   0   'False
  518.       EndProperty
  519.       Height          =   372
  520.       Left            =   240
  521.       TabIndex        =   56
  522.       Top             =   6720
  523.       Width           =   4692
  524.    End
  525.    Begin VB.Label Label10 
  526.       Caption         =   "3.  Look carefully on the inputs. (please check the source code comments or related references."
  527.       BeginProperty Font 
  528.          Name            =   "MS Sans Serif"
  529.          Size            =   8.25
  530.          Charset         =   0
  531.          Weight          =   400
  532.          Underline       =   0   'False
  533.          Italic          =   -1  'True
  534.          Strikethrough   =   0   'False
  535.       EndProperty
  536.       Height          =   372
  537.       Left            =   240
  538.       TabIndex        =   55
  539.       Top             =   6240
  540.       Width           =   4692
  541.    End
  542.    Begin VB.Label Label9 
  543.       Caption         =   "2.  Press the ""Create...Object"" button"
  544.       BeginProperty Font 
  545.          Name            =   "MS Sans Serif"
  546.          Size            =   8.25
  547.          Charset         =   0
  548.          Weight          =   400
  549.          Underline       =   0   'False
  550.          Italic          =   -1  'True
  551.          Strikethrough   =   0   'False
  552.       EndProperty
  553.       Height          =   252
  554.       Left            =   240
  555.       TabIndex        =   54
  556.       Top             =   5880
  557.       Width           =   4692
  558.    End
  559.    Begin VB.Label Label8 
  560.       Caption         =   "1.  Press the ""First thing...OMS"" button"
  561.       BeginProperty Font 
  562.          Name            =   "MS Sans Serif"
  563.          Size            =   8.25
  564.          Charset         =   0
  565.          Weight          =   400
  566.          Underline       =   0   'False
  567.          Italic          =   -1  'True
  568.          Strikethrough   =   0   'False
  569.       EndProperty
  570.       Height          =   252
  571.       Left            =   240
  572.       TabIndex        =   53
  573.       Top             =   5520
  574.       Width           =   4692
  575.    End
  576.    Begin VB.Label Label7 
  577.       Caption         =   "Steps for using this application properly:"
  578.       BeginProperty Font 
  579.          Name            =   "MS Sans Serif"
  580.          Size            =   8.25
  581.          Charset         =   0
  582.          Weight          =   700
  583.          Underline       =   0   'False
  584.          Italic          =   0   'False
  585.          Strikethrough   =   0   'False
  586.       EndProperty
  587.       Height          =   252
  588.       Left            =   240
  589.       TabIndex        =   52
  590.       Top             =   5040
  591.       Width           =   3852
  592.    End
  593.    Begin VB.Label Label6 
  594.       Alignment       =   2  'Center
  595.       Caption         =   "Add"
  596.       BeginProperty Font 
  597.          Name            =   "Arial"
  598.          Size            =   12
  599.          Charset         =   0
  600.          Weight          =   700
  601.          Underline       =   0   'False
  602.          Italic          =   0   'False
  603.          Strikethrough   =   0   'False
  604.       EndProperty
  605.       Height          =   255
  606.       Left            =   7080
  607.       TabIndex        =   39
  608.       Top             =   4200
  609.       Width           =   735
  610.    End
  611.    Begin VB.Label Label5 
  612.       Alignment       =   2  'Center
  613.       Caption         =   "Delete"
  614.       BeginProperty Font 
  615.          Name            =   "Arial"
  616.          Size            =   12
  617.          Charset         =   0
  618.          Weight          =   700
  619.          Underline       =   0   'False
  620.          Italic          =   0   'False
  621.          Strikethrough   =   0   'False
  622.       EndProperty
  623.       Height          =   255
  624.       Left            =   7920
  625.       TabIndex        =   38
  626.       Top             =   3000
  627.       Width           =   975
  628.    End
  629.    Begin VB.Label Label4 
  630.       Alignment       =   2  'Center
  631.       Caption         =   "Modify"
  632.       BeginProperty Font 
  633.          Name            =   "Arial"
  634.          Size            =   12
  635.          Charset         =   0
  636.          Weight          =   700
  637.          Underline       =   0   'False
  638.          Italic          =   0   'False
  639.          Strikethrough   =   0   'False
  640.       EndProperty
  641.       Height          =   255
  642.       Left            =   7920
  643.       TabIndex        =   36
  644.       Top             =   1560
  645.       Width           =   975
  646.    End
  647.    Begin VB.Label Label3 
  648.       Alignment       =   2  'Center
  649.       Caption         =   "Is...NameNotUnique"
  650.       BeginProperty Font 
  651.          Name            =   "Arial"
  652.          Size            =   12
  653.          Charset         =   0
  654.          Weight          =   700
  655.          Underline       =   0   'False
  656.          Italic          =   0   'False
  657.          Strikethrough   =   0   'False
  658.       EndProperty
  659.       Height          =   252
  660.       Left            =   240
  661.       TabIndex        =   35
  662.       Top             =   1560
  663.       Width           =   2532
  664.    End
  665.    Begin VB.Label Label2 
  666.       Alignment       =   2  'Center
  667.       Caption         =   "Inputs and Outputs"
  668.       BeginProperty Font 
  669.          Name            =   "Arial"
  670.          Size            =   10.5
  671.          Charset         =   0
  672.          Weight          =   700
  673.          Underline       =   0   'False
  674.          Italic          =   0   'False
  675.          Strikethrough   =   0   'False
  676.       EndProperty
  677.       Height          =   252
  678.       Left            =   3120
  679.       TabIndex        =   34
  680.       Top             =   1560
  681.       Width           =   2052
  682.    End
  683.    Begin VB.Line Line1 
  684.       X1              =   120
  685.       X2              =   9240
  686.       Y1              =   1320
  687.       Y2              =   1320
  688.    End
  689.    Begin VB.Label Label1 
  690.       Alignment       =   2  'Center
  691.       Caption         =   "Read"
  692.       BeginProperty Font 
  693.          Name            =   "Arial"
  694.          Size            =   12
  695.          Charset         =   0
  696.          Weight          =   700
  697.          Underline       =   0   'False
  698.          Italic          =   0   'False
  699.          Strikethrough   =   0   'False
  700.       EndProperty
  701.       Height          =   252
  702.       Left            =   5760
  703.       TabIndex        =   33
  704.       Top             =   1560
  705.       Width           =   1092
  706.    End
  707. Attribute VB_Name = "omsForm"
  708. Attribute VB_GlobalNameSpace = False
  709. Attribute VB_Creatable = False
  710. Attribute VB_PredeclaredId = True
  711. Attribute VB_Exposed = False
  712. '==========================================================================;
  713. '  This code and information is provided "as is" without warranty of any
  714. '  kind, either expressed or implied, including but not limited to the
  715. '  implied warranties of merchantability and/or fitness for a particular
  716. '  purpose..
  717. '  Copyright (c) 1998  Multiactive Software Inc.  All Rights Reserved.
  718. '==========================================================================;
  719. Dim OMS As Object               'Object for OMS
  720. Dim App As Object               'Object for Enterprise 97
  721. Dim id As Long                  'ID for strategy, step, activity, role, role standing, success factor, and success factor standing (depends on the circumstance)
  722. Dim lck As Long                 'Lock for write (0 for read-only, 1 for read-write)
  723. Dim names As String             'Name, like strategy name, step name...
  724. Dim description As String       'Description, like strategy description...
  725. Dim subtype As Integer          'SubType
  726. Dim score As Integer            'Score for standings (0..100)
  727. Dim weight As Integer           'Weight (0..100)
  728. Dim factorid As Long            'Factor Id
  729. Dim factorstandingid As Long    'Factor Standing Id
  730. Dim strategyid As Long          'Strategy Id
  731. Dim stepid As Long              'Step Id
  732. Dim order As Integer            'Chronological order for steps and activities
  733. Dim roleid As Long              'Role Id
  734. Dim rolestandingid As Long      'Role Standing Id
  735. Dim stepcount As Integer        'Step count
  736. Dim activitycount As Integer    'Activity count
  737. Dim duration As Integer         'Effort time
  738. Dim interval As Integer         'Duration time
  739. Dim cost As Integer             'Cost
  740. Dim priority As String          'Priorty (Maximium 3 characters)
  741. Dim hotlisttype As Integer      'Hotlist Type (Icon number in the activity 0..9)
  742. Dim withrole As Long            'With Role (by role id)
  743. Dim alarm As Integer            'Alarm (0 for disable; 1 for able)
  744. Dim alarmminute As Long         'Alarm Lead Minutes (leave it blank if 0 for alarm)
  745. ' This function is called when the user clicks the "Create OMS Object" button
  746. Private Sub Command1_Click()
  747.     If Not OMS Is Nothing Then  'Check is OMS already created
  748.         Exit Sub
  749.     End If
  750.     Set OMS = Nothing
  751.     Set OMS = CreateObject("Maximizer.OMS") 'Create object
  752.     Call OMS.OpenStratLibFiles      'First thing to do before using any OMS function
  753. End Sub
  754. ' This function is called when the user clicks the IsFactorStandingNameNotUnique button
  755. Private Sub Command10_Click()
  756.     If OMS Is Nothing Then
  757.         Exit Sub
  758.     End If
  759.     'IsFactorStandingNameNotUnique("Factor Standing Name")
  760.     Text1.Text = OMS.IsFactorStandingNameNotUnique("Factor Standing Test 1")
  761. End Sub
  762. ' This function is called when the user clicks the ReadFirstFactor button
  763. Private Sub Command11_Click()
  764.     If OMS Is Nothing Then
  765.         Exit Sub
  766.     End If
  767.     'ReadFirstFactor("Lock for write", "ID", "Name", "Description", "SubType")
  768.     Call OMS.ReadFirstFactor(lck, id, names, description, subtype)
  769.     'Display the data in the text boxes
  770.     Text2.Text = lck
  771.     Text3.Text = id
  772.     factorid = id
  773.     Text4.Text = names
  774.     Text5.Text = description
  775.     Text6.Text = subtype
  776.     factorstandingid = 0
  777. End Sub
  778. ' This function is called when the user clicks the ModifyFactor button
  779. Private Sub Command12_Click()
  780.     If OMS Is Nothing Then
  781.         Exit Sub
  782.     End If
  783.     'ModifyFactor("ID which is generated by Maximizer", "Name", "Description", "SubType")
  784.     Call OMS.ModifyFactor(Text3.Text, Text4.Text, Text5.Text, Text6.Text)
  785. End Sub
  786. ' This function is called when the user clicks the DeleteFactorStanding button
  787. Private Sub Command13_Click()
  788.     If OMS Is Nothing Then
  789.         Exit Sub
  790.     End If
  791.     'DeleteFactorStanding("the standing ID")
  792.     Call OMS.DeleteFactorStanding(Text3.Text)
  793. End Sub
  794. ' This function is called when the user clicks the AddStrategy button
  795. Private Sub Command14_Click()   'AddStrategy
  796.     If OMS Is Nothing Then
  797.         Exit Sub
  798.     End If
  799.     'AddStrategy("ID which is generated by Maximizer--leave it blank", "Name", "Description", "Step Count", "Activity Count", "Duration", "Interval", "Cost")
  800.     Call OMS.AddStrategy(id, Text4.Text, Text5.Text, Text6.Text, Text7.Text, Text8.Text, Text9.Text, Text10.Text)
  801.     Text3.Text = id
  802. End Sub
  803. ' This function is called when the user clicks the "First thing to do before OMS" button
  804. Private Sub Command15_Click()
  805.     If Not App Is Nothing Then
  806.         Exit Sub
  807.     End If
  808.     Set App = Nothing
  809.     'To open the application
  810.     Set App = CreateObject("Maximizer.Application")
  811.     'To be visible
  812.     App.SetVisibilityState ("Restore")
  813.      
  814.     'To open a database
  815.     Call App.OpenDatabase("Open", "Enterprise Test 1", , "MASTER", "CONTROL") 'OK
  816. End Sub
  817. ' This function is called when the user clicks the "Last thing to do before exit" button
  818. Private Sub Command16_Click()
  819.     If App Is Nothing Then
  820.         Exit Sub
  821.     End If
  822.     'To close the current database
  823.     App.CloseDatabase
  824.     'To close the Enterprise application
  825.     Set App = Nothing
  826. End Sub
  827. ' This function is called when the user clicks the "ReadFirstFactorStandingLink" button
  828. Private Sub Command17_Click()
  829.     If OMS Is Nothing Then
  830.         Exit Sub
  831.     End If
  832.     lck = Text2.Text        'take the text2 box's text
  833.             
  834.     'ReadFirstFactorStandingLink("Lock", "Factor Id", "Factor Standing Id")
  835.     'Provide either factorid or factorstandingid, then the function will search for the other id
  836.     Call OMS.ReadFirstFactorStandingLink(lck, factorid, factorstandingid)
  837.     'Display the data in the text boxes
  838.     Text2.Text = lck
  839.     Text5.Text = factorid
  840.     Text6.Text = factorstandingid
  841. End Sub
  842. ' This function is called when the user clicks the "ReadFactorStanding" button
  843. Private Sub Command18_Click()
  844.     If OMS Is Nothing Then
  845.         Exit Sub
  846.     End If
  847.     id = 0
  848.     'Assign a specific(EXISTING ID!!!) id before running this function!
  849.     id = Text3.Text
  850.     'ReadFactorStanding("id", "Name", "Score", "SubType")
  851.     Call OMS.ReadFactorStanding(id, names, score, subtype)
  852.     'Display the data in the text boxes
  853.     Text2.Text = lck
  854.     Text3.Text = id
  855.     factorstandingid = id   'For some "Read..Link" functions
  856.     Text4.Text = names
  857.     Text5.Text = score
  858.     Text6.Text = subtype
  859.     factorid = 0            'For some "Read..Link" functions
  860. End Sub
  861. ' This function is called when the user clicks the "ReadNextFactorStandingLink" button
  862. Private Sub Command19_Click()
  863.     If OMS Is Nothing Then
  864.         Exit Sub
  865.     End If
  866.     lck = Text2.Text
  867.     factorstandingid = 0
  868.           
  869.     'ReadNextFactorStandingLink("Lock", "Factor Id", "Factor Standing Id")
  870.     'Because it is a link function, that means it needs either factorid or factorstandingid for searching each other
  871.     'Therefore, user needs to run either readfirstfactor, readnextfactor or readfactorstanding before running this function
  872.     Call OMS.ReadNextFactorStandingLink(lck, factorid, factorstandingid)
  873.     Text2.Text = lck
  874.     Text5.Text = factorid
  875.     Text6.Text = factorstandingid
  876. End Sub
  877. ' This function is called when the user clicks the Close OMS Object button
  878. Private Sub Command2_Click()
  879.     If OMS Is Nothing Then
  880.         Exit Sub
  881.     End If
  882.     'Last thing needs to do before close the object
  883.     Call OMS.CloseStratLibFiles
  884.     Set OMS = Nothing
  885. End Sub
  886. ' This function is called when the user clicks the "ReadNextFactor" button
  887. Private Sub Command20_Click()
  888.     If OMS Is Nothing Then
  889.         Exit Sub
  890.     End If
  891.     'ReadNextFactor("Lock", "Id", "Name", "Description", "SubType")
  892.     Call OMS.ReadNextFactor(lck, id, names, description, subtype)
  893.     'Display the data to the text boxes
  894.     Text2.Text = lck
  895.     Text3.Text = id
  896.     factorid = id               'will use in some "Read..Link" functions
  897.     Text4.Text = names
  898.     Text5.Text = description
  899.     Text6.Text = subtype
  900.     factorstandingid = 0
  901. End Sub
  902. ' This function is called when the user clicks the "ModifyFactorStanding" button
  903. Private Sub Command21_Click()
  904.     If OMS Is Nothing Then
  905.         Exit Sub
  906.     End If
  907.     'ModifyFactorStanding("ID", "Name", "Score", "SubType")
  908.     Call OMS.ModifyFactorStanding(Text3.Text, Text4.Text, Text5.Text, Text6.Text)
  909. End Sub
  910. ' This function is called when the user clicks the "AddRole" button
  911. Private Sub Command22_Click()
  912.     If OMS Is Nothing Then
  913.         Exit Sub
  914.     End If
  915.     'Assign text to valuables, make sure you input to the correct field!
  916.     names = Text4.Text
  917.     description = Text5.Text
  918.     'AddRole("Id", "Name", "Description")
  919.     'the id will be generated by Enterprise, so leave it in blank!
  920.     Call OMS.AddRole(id, names, description)
  921.     Text3.Text = id
  922. End Sub
  923. ' This function is called when the user clicks the "AddFactor" button
  924. Private Sub Command23_Click()
  925.     If OMS Is Nothing Then
  926.         Exit Sub
  927.     End If
  928.     'Assign text to valuables, make sure you input to the correct field!
  929.     names = Text4.Text
  930.     description = Text5.Text
  931.     subtype = Text6.Text
  932.     'AddFactor("Id", "Name", "Description", "SubType")
  933.     Call OMS.AddFactor(id, names, description, subtype)
  934.     Text3.Text = id
  935. End Sub
  936. ' This function is called when the user clicks the "AddStep" button
  937. Private Sub Command24_Click()
  938.     If OMS Is Nothing Then
  939.         Exit Sub
  940.     End If
  941.     'Assign text to valuables, make sure you input to the correct field!
  942.     names = Text4.Text
  943.     description = Text5.Text
  944.     activitycount = Text6.Text
  945.     duration = Text7.Text
  946.     interval = Text8.Text
  947.     cost = Text9.Text
  948.     'AddStep("Id", "Name", "Description", "Activity Included", "Effort Time", "Duration", "Cost")
  949.     'Usually activitycount, duration, interval, and cost are all equal to 0 when you first create a step
  950.     Call OMS.AddStep(id, names, description, activitycount, duration, interval, cost)
  951.     Text3.Text = id
  952. End Sub
  953. ' This function is called when the user clicks the "AddActivity" button
  954. Private Sub Command25_Click()
  955.     If OMS Is Nothing Then
  956.         Exit Sub
  957.     End If
  958.     'Assign text to valuables, make sure you input to the correct field!
  959.     names = Text4.Text
  960.     description = Text5.Text
  961.     priority = Text6.Text
  962.     hotlisttype = Text7.Text
  963.     withrole = Text8.Text
  964.     duration = Text9.Text
  965.     cost = Text10.Text
  966.     alarm = Text11.Text
  967.     alarmminute = Text12.Text
  968.     'AddActivity("Id", "Name", "Description", "Priority", "Hotlist Type", "With Role", "Effort Time", "Cost", "Alarm", "Alarm Lead Minutes")
  969.     Call OMS.AddActivity(id, names, description, priority, hotlisttype, withrole, duration, cost, alarm, alarmminute)
  970.     Text3.Text = id
  971. End Sub
  972. ' This function is called when the user clicks the "AddStrategyRoleLink" button
  973. Private Sub Command26_Click()
  974.     If OMS Is Nothing Then
  975.         Exit Sub
  976.     End If
  977.     'Assign text to valuables, make sure you input to the correct field!
  978.     strategyid = Text3.Text
  979.     roleid = Text4.Text
  980.     weight = Text5.Text
  981.     'AddStrategyRoleLink("Strategy Id", "Role Id", "Weight")
  982.     Call OMS.AddStrategyRoleLink(strategyid, roleid, weight)
  983. End Sub
  984. ' This function is called when the user clicks the "AddStrategyFactorLink" button
  985. Private Sub Command27_Click()
  986.     If OMS Is Nothing Then
  987.         Exit Sub
  988.     End If
  989.     'Assign text to valuables, make sure you input to the correct field!
  990.     strategyid = Text3.Text
  991.     factorid = Text4.Text
  992.     weight = Text5.Text
  993.     'AddStrategyFactorLink("Strategy Id", "Factor Id", "Weight")
  994.     Call OMS.AddStrategyFactorLink(strategyid, factorid, weight)
  995. End Sub
  996. ' This function is called when the user clicks the "AddStrategyStepLink" button
  997. Private Sub Command28_Click()
  998.     If OMS Is Nothing Then
  999.         Exit Sub
  1000.     End If
  1001.     'Assign text to valuables, make sure you input to the correct field!
  1002.     strategyid = Text3.Text
  1003.     stepid = Text4.Text
  1004.     order = Text5.Text
  1005.     'AddStrategyStepLink("Strategy Id", "Step Id", "Chronlogical Order")
  1006.     Call OMS.AddStrategyStepLink(strategyid, stepid, order)
  1007. End Sub
  1008. ' This function is called when the user clicks the IsStrategyNameNotUnique button
  1009. Private Sub Command3_Click()
  1010.     If OMS Is Nothing Then
  1011.         Exit Sub
  1012.     End If
  1013.     'IsStrategyNameNotUnique("Strategy Name")
  1014.     Text1.Text = OMS.IsStrategyNameNotUnique("Strategy Test 1")
  1015. End Sub
  1016. ' This function is called when the user clicks the "AddStepActivityLink" button
  1017. Private Sub Command30_Click()
  1018.     If OMS Is Nothing Then
  1019.         Exit Sub
  1020.     End If
  1021.     'Assign text to valuables, make sure you input to the correct field!
  1022.     stepid = Text3.Text
  1023.     activityid = Text4.Text
  1024.     order = Text5.Text
  1025.     'AddStepActivityLink("Step Id", "Activity Id", "Chronlogical Order")
  1026.     Call OMS.AddStepActivityLink(stepid, activityid, order)
  1027. End Sub
  1028. ' This function is called when the user clicks the "AddFactorStandingLink" button
  1029. Private Sub Command31_Click()
  1030.     If OMS Is Nothing Then
  1031.         Exit Sub
  1032.     End If
  1033.     'Assign text to valuables, make sure you input to the correct field!
  1034.     factorid = Text3.Text
  1035.     factorstandingid = Text4.Text
  1036.     'AddFactorStandingLink("Factor Id", "Factor Standing Id")
  1037.     Call OMS.AddFactorStandingLink(factorid, factorstandingid)
  1038. End Sub
  1039. ' This function is called when the user clicks the "AddRoleStandingLink" button
  1040. Private Sub Command32_Click()
  1041.     If OMS Is Nothing Then
  1042.         Exit Sub
  1043.     End If
  1044.     'Assign text to valuables, make sure you input to the correct field!
  1045.     roleid = Text3.Text
  1046.     rolestandingid = Text4.Text
  1047.     Call OMS.AddRoleStandingLink(roleid, rolestandingid)
  1048. End Sub
  1049. ' This function is called when the user clicks the "AddFactorStanding" button
  1050. Private Sub Command33_Click()
  1051.     If OMS Is Nothing Then
  1052.         Exit Sub
  1053.     End If
  1054.     'Assign text to valuables, make sure you input to the correct field!
  1055.     names = Text4.Text
  1056.     score = Text5.Text
  1057.     subtype = Text6.Text
  1058.     'AddFactorStanding("Id", "Name", "Score", "SubType")
  1059.     'Id is generated by Enterprise, please leave it blank!
  1060.     Call OMS.AddFactorStanding(id, names, score, subtype)
  1061.     Text3.Text = id
  1062. End Sub
  1063. ' This function is called when the user clicks the "AddRoleStanding" button
  1064. Private Sub Command34_Click()
  1065.     If OMS Is Nothing Then
  1066.         Exit Sub
  1067.     End If
  1068.     'Assign text to valuables, make sure you input to the correct field!
  1069.     names = Text4.Text
  1070.     score = Text5.Text
  1071.     'AddRoleStanding("Id", "Name", "Score", "SubType")
  1072.     'Id is generated by Enterprise, please leave it blank!
  1073.     Call OMS.AddRoleStanding(id, names, score)
  1074.     Text3.Text = id
  1075. End Sub
  1076. 'Exit this VB application
  1077. Private Sub Command4_Click()
  1078.     Unload omsForm
  1079. End Sub
  1080. ' This function is called when the user clicks the IsStepNameNotUnique button
  1081. Private Sub Command5_Click()
  1082.     If OMS Is Nothing Then
  1083.         Exit Sub
  1084.     End If
  1085.     'IsStepNameNotUnique("Step Name")
  1086.     'Return 0 if it is not unique
  1087.     Text1.Text = OMS.IsStepNameNotUnique("Step Test 1")
  1088. End Sub
  1089. ' This function is called when the user clicks the IsActivityNameNotUnique button
  1090. Private Sub Command6_Click()
  1091.     If OMS Is Nothing Then
  1092.         Exit Sub
  1093.     End If
  1094.     'IsActivityNameNotUnique("Activity Name")
  1095.     'Return 0 if it is not unique
  1096.     Text1.Text = OMS.IsActivityNameNotUnique("Activity Test 1")
  1097. End Sub
  1098. ' This function is called when the user clicks the IsRoleNameNotUnique button
  1099. Private Sub Command7_Click()
  1100.     If OMS Is Nothing Then
  1101.         Exit Sub
  1102.     End If
  1103.     'IsRoleNameNotUnique("Role Name")
  1104.     'Return 0 if it is not unique
  1105.     Text1.Text = OMS.IsRoleNameNotUnique("Role Test 1")
  1106. End Sub
  1107. ' This function is called when the user clicks the IsFactorNameNotUnique button
  1108. Private Sub Command8_Click()
  1109.     If OMS Is Nothing Then
  1110.         Exit Sub
  1111.     End If
  1112.     'IsFactorNameNotUnique("Factor Name")
  1113.     'Return 0 if it is not unique
  1114.     Text1.Text = OMS.IsFactorNameNotUnique("Factor Test 1")
  1115. End Sub
  1116. ' This function is called when the user clicks the IsRoleStandingNameNotUnique button
  1117. Private Sub Command9_Click()
  1118.     If OMS Is Nothing Then
  1119.         Exit Sub
  1120.     End If
  1121.     'IsRoleStandingNameNotUnique("Role Standing Name")
  1122.     'Return 0 if it is not unique
  1123.     Text1.Text = OMS.IsRoleStandingNameNotUnique("Role Standing Test 1")
  1124. End Sub
  1125.