  L                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 VERSION =   3.00      dataenvironment      dataenvironment      Dataenvironment      Name = "Dataenvironment"
      1      1      t_formretrieve      ..\libs\t_base.vcx      form      frmStatusChange      Height = 100
Width = 375
DoCreate = .T.
Caption = "Status Change"
WindowType = 1
cnewstatus = 
coldstatus = 
Name = "frmStatusChange"
     PROCEDURE Release
DO CASE
	&& Status has changed so return new status
	CASE thisform.cNewStatus = "Active"
		thisform.uReturnValue = "A"
		
	CASE thisform.cNewStatus = "Inactive"
		thisform.uReturnValue = "I"
		
	CASE thisform.cNewStatus = "Delete"
		thisform.uReturnValue = "D"
		
	OTHERWISE
		&& Status has not changed so return old status
		DO CASE
			CASE thisform.cOldStatus = "Active"
				thisform.uReturnValue = "A"
		
			CASE thisform.cOldStatus = "Inactive"
				thisform.uReturnValue = "I"
		
			CASE thisform.cOldStatus = "Delete"
				thisform.uReturnValue = "D"
				
		ENDCASE	
			
ENDCASE

ENDPROC
PROCEDURE Init
PARAMETERS lcStatus

lcStatus = ALLTRIM(lcStatus)

DO CASE
	CASE lcStatus = "A"
		thisform.cOldStatus = "Active"
		ThisForm.cmdActivate.enabled = .F.
	CASE lcStatus = "I"
		thisform.cOldStatus = "Inactive"
		ThisForm.cmdInactivate.enabled = .F.
	CASE lcStatus = "D"
		thisform.cOldStatus = "Delete"
		ThisForm.cmdDelete.enabled = .F.
	OTHERWISE 
		MESSAGEBOX("Unknown status - Status will be changed to Inactive",48,"Status Change")	
		thisform.cOldStatus = "Inactive"
		ThisForm.cmdInactivate.enabled = .F.
ENDCASE

ENDPROC
                                         %   P       e      _             U   
     U  THISFORM RELEASE Click,     1  1                       !       )                                                               %   r                          U  #  T    Delete
     U  THISFORM
 CNEWSTATUS RELEASE Click,     1 a 2                       C       )                                                               %   t                          U  %  T    Inactive
     U  THISFORM
 CNEWSTATUS RELEASE Click,     1  2                       E       )                                                               %   r                          U  #  T    Active
     U  THISFORM
 CNEWSTATUS RELEASE Click,     1 a 2                       C       )                            !Arial, 0, 9, 5, 15, 12, 13, 3, 0
      ,PROCEDURE Click
thisform.release
ENDPROC
      frmStatusChange      cnewstatus
coldstatus
      t_label      ..\libs\t_base.vcx      label      lblCurrantStatus      frmStatusChange      eCaption = "Current Status"
Height = 16
Left = 89
Top = 16
Width = 84
Name = "lblCurrantStatus"
      	t_textbox      ..\libs\t_base.vcx      textbox      txtCurrentStatus      frmStatusChange      hControlSource = "thisform.cOldStatus"
Left = 185
ReadOnly = .T.
Top = 12
Name = "txtCurrentStatus"
      t_commandbutton      ..\libs\t_base.vcx      commandbutton      cmdActivate      frmStatusChange      PTop = 60
Left = 7
Caption = "\<Activate"
TabIndex = 1
Name = "cmdActivate"
      NPROCEDURE Click
thisform.cNewStatus = "Active"
thisform.release

ENDPROC
      NTop = 60
Left = 283
Caption = "\<Cancel"
TabIndex = 4
Name = "cmdCancel"
      	cmdCancel      commandbutton      ..\libs\t_base.vcx      t_commandbutton      frmStatusChange      	cmdDelete      commandbutton      t_commandbutton      ..\libs\t_base.vcx      commandbutton      cmdInactivate      frmStatusChange      UTop = 60
Left = 98
Caption = "\<Inactivate"
TabIndex = 2
Name = "cmdInactivate"
      PPROCEDURE Click
thisform.cNewStatus = "Inactive"
thisform.release

ENDPROC
      NPROCEDURE Click
thisform.cNewStatus = "Delete"
thisform.release

ENDPROC
      NTop = 60
Left = 191
Caption = "\<Delete"
TabIndex = 3
Name = "cmdDelete"
      ..\libs\t_base.vcx      t_commandbutton                                   2   %   A        %   `            U  3 H ,     Active8  T    A     Inactivee  T    I     Delete  T    D 2, H (     Active  T    A     Inactive  T    I     Delete( T    D   U  THISFORM
 CNEWSTATUS URETURNVALUE
 COLDSTATUSZ 4   T  C   H# S    A\  T   Active T   -    I  T   Inactive T   -    D  T   Delete T   - 2SR C3 Unknown status - Status will be changed to Inactive0 Status Changex T   Inactive T   -  U  LCSTATUS THISFORM
 COLDSTATUS CMDACTIVATE ENABLED CMDINACTIVATE	 CMDDELETE Release,      Init    1    B B 3 q   !a!!a !A 2                       t                )                     
