Mini Kabibi Habibi

Current Path : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/samples/solution/forms/
Upload File :
Current File : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/samples/solution/forms/many.sct

K�VERSION =   3.00dataenvironmentdataenvironmentDataenvironmentILeft = 50
Top = 5
Width = 643
Height = 214
Name = "Dataenvironment"
cursorcursorCursor1Dataenvironment�Left = 20
Top = 10
Width = 99
Height = 90
Alias = "customer"
Database = ..\..\data\testdata.dbc
CursorSource = "customer"
Name = "Cursor1"
cursorcursorCursor2Dataenvironment�Left = 176
Top = 2
Width = 99
Height = 172
Alias = "orders"
Database = ..\..\data\testdata.dbc
CursorSource = "orders"
Name = "Cursor2"
relationrelation	Relation1DataenvironmentyParentAlias = "customer"
RelationalExpr = "cust_id"
ChildAlias = "orders"
ChildOrder = "cust_id"
Name = "Relation1"
42formformfrmCustomerOrderInfo�DataSession = 2
Top = 12
Left = 8
Height = 332
Width = 552
DoCreate = .T.
BorderStyle = 3
Caption = "Create a 1-to-Many Data Entry Form"
MaxButton = .F.
LockScreen = .F.
HelpContextID = 164
Name = "frmCustomerOrderInfo"
PROCEDURE Deactivate
IF TYPE("THIS.c_solutions1") = "O" THEN
	THIS.c_solutions1.restoreHelp
ENDIF
ENDPROC
PROCEDURE Activate
THIS.c_solutions1.saveHelp
ENDPROC
PROCEDURE Init
IF  fontmetric(1, 'MS Sans Serif', 8, '') # 13 OR ;
	fontmetric(4, 'MS Sans Serif', 8, '') # 2 OR ;
	fontmetric(6, 'MS Sans Serif', 8, '') # 5 OR ;
	fontmetric(7, 'MS Sans Serif', 8, '') # 11
	this.setall('fontname', 'Tahoma')  
ELSE
	this.setall('fontname','MS Sans Serif')
ENDIF
this.setall('fontsize',8)


ENDPROC
��� ��<�%�'�U9%%�C�THIS.c_solutions1b�O��2�
������UTHISC_SOLUTIONS1RESTOREHELP
�����UTHISC_SOLUTIONS1SAVEHELP	�%�C��
MS Sans Serif���$�
�!C��
MS Sans Serif���$��!C��
MS Sans Serif���$��!C��
MS Sans Serif���$�����!��C�fontname�Tahoma�������(��C�fontname�
MS Sans Serif�������C�fontsize�����UTHISSETALL
Deactivate,��Activate���Init���1Q�A2�2d	��A�3d����	)�M*buttonrefresh Enables/Disables navigation buttons based on current record.
shapeshapeShape3frmCustomerOrderInfoUTop = 167
Left = 10
Height = 128
Width = 531
SpecialEffect = 0
Name = "Shape3"
shapeshapeShape1frmCustomerOrderInfoSTop = 78
Left = 10
Height = 76
Width = 531
SpecialEffect = 0
Name = "Shape1"
labellabelLabel6frmCustomerOrderInfo�AutoSize = .T.
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
Alignment = 1
Caption = " \<Orders "
Height = 15
Left = 16
Top = 161
Width = 39
TabIndex = 12
Name = "Label6"
gridgrid
grdOrdersGridfrmCustomerOrderInfotColumnCount = 8
FontBold = .F.
FontSize = 9
Height = 102
Left = 20
LinkMaster = "Customer"
Panel = 1
RecordSource = "orders"
RelationalExpr = "Cust_id"
RowHeight = 22
ScrollBars = 3
TabIndex = 13
Top = 184
Width = 432
Name = "grdOrdersGrid"
Column1.FontBold = .F.
Column1.FontName = "MS Sans Serif"
Column1.FontSize = 8
Column1.ControlSource = "orders.order_id"
Column1.Width = 55
Column1.Name = "grhOrder_id"
Column2.FontBold = .F.
Column2.FontName = "MS Sans Serif"
Column2.FontSize = 8
Column2.ColumnOrder = 7
Column2.ControlSource = "orders.require_by"
Column2.Width = 68
Column2.Name = "grhRequired_by"
Column3.FontBold = .F.
Column3.FontName = "MS Sans Serif"
Column3.FontSize = 8
Column3.ColumnOrder = 6
Column3.ControlSource = "orders.freight"
Column3.Width = 48
Column3.Sparse = .F.
Column3.Name = "grhFreight"
Column4.FontBold = .F.
Column4.FontName = "MS Sans Serif"
Column4.FontSize = 8
Column4.ColumnOrder = 2
Column4.ControlSource = "orders.order_date"
Column4.Width = 52
Column4.Name = "grhOrder_date"
Column5.FontBold = .F.
Column5.FontName = "MS Sans Serif"
Column5.FontSize = 8
Column5.ColumnOrder = 3
Column5.ControlSource = "orders.order_amt"
Column5.Width = 58
Column5.Sparse = .F.
Column5.Name = "grhOrder_amt"
Column6.FontBold = .F.
Column6.FontName = "MS Sans Serif"
Column6.FontSize = 8
Column6.ColumnOrder = 4
Column6.ControlSource = "orders.order_dsc"
Column6.Width = 48
Column6.Sparse = .F.
Column6.Name = "grhOrder_dsc"
Column7.FontBold = .F.
Column7.FontName = "MS Sans Serif"
Column7.FontSize = 8
Column7.ColumnOrder = 5
Column7.ControlSource = "orders.order_net"
Column7.Width = 60
Column7.Sparse = .F.
Column7.Name = "grhOrder_net"
Column8.FontBold = .F.
Column8.FontName = "MS Sans Serif"
Column8.FontSize = 8
Column8.ControlSource = "orders.shipped_on"
Column8.Width = 73
Column8.Name = "grhShipped"
headerheaderHeader1.frmCustomerOrderInfo.grdOrdersGrid.grhOrder_idvFontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
FontCondense = .T.
Caption = "Order ID"
Name = "Header1"
textboxtextboxText1.frmCustomerOrderInfo.grdOrdersGrid.grhOrder_id�FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader11frmCustomerOrderInfo.grdOrdersGrid.grhRequired_bydFontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Requred By"
Name = "Header1"
textboxtextboxText11frmCustomerOrderInfo.grdOrdersGrid.grhRequired_by�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader1-frmCustomerOrderInfo.grdOrdersGrid.grhFreightaFontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Freight"
Name = "Header1"
textboxtextboxText1-frmCustomerOrderInfo.grdOrdersGrid.grhFreight�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Format = "R"
InputMask = "$9,999"
Margin = 0
MaxLength = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader10frmCustomerOrderInfo.grdOrdersGrid.grhOrder_date^FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Date"
Name = "Header1"
textboxtextboxText10frmCustomerOrderInfo.grdOrdersGrid.grhOrder_date�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader1/frmCustomerOrderInfo.grdOrdersGrid.grhOrder_amtvFontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
FontStrikethru = .F.
Caption = "Amount"
Name = "Header1"
textboxtextboxText1/frmCustomerOrderInfo.grdOrdersGrid.grhOrder_amt�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Format = "R"
InputMask = "$99999.99"
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader1/frmCustomerOrderInfo.grdOrdersGrid.grhOrder_dscbFontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Discount"
Name = "Header1"
textboxtextboxText1/frmCustomerOrderInfo.grdOrdersGrid.grhOrder_dsc�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Format = "R"
InputMask = "99%"
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader1/frmCustomerOrderInfo.grdOrdersGrid.grhOrder_net]FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Net"
Name = "Header1"
textboxtextboxText1/frmCustomerOrderInfo.grdOrdersGrid.grhOrder_net�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Format = "R"
InputMask = "$99999.99"
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"
headerheaderHeader1-frmCustomerOrderInfo.grdOrdersGrid.grhShippedfFontBold = .F.
FontName = "MS Sans Serif"
FontSize = 8
Caption = "Shipped Date"
Name = "Header1"
textboxtextboxText1-frmCustomerOrderInfo.grdOrdersGrid.grhShipped�FontName = "MS Sans Serif"
FontSize = 8
BorderStyle = 0
Margin = 0
ColorSource = 3
ForeColor = 0,0,0
BackColor = 255,255,255
Name = "Text1"

commandbutton
commandbuttoncmdNewfrmCustomerOrderInfo�Top = 92
Left = 459
Height = 23
Width = 72
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
Caption = "\<New"
TabIndex = 10
Name = "cmdNew"
�PROCEDURE Error
LPARAMETERS nError, cMethod, nLine

MESSAGEBOX(MESSAGE())
ENDPROC
PROCEDURE Click
SELECT CUSTOMER
APPEND BLANK

THISFORM.Refresh
ENDPROC
?�� &&�u%����U�������CCE�x��UNERRORCMETHODNLINEF���
����UCUSTOMERTHISFORMREFRESHError,��Clicke��1��2qQ�1Lh�)&
commandbutton
commandbutton	cmdDeletefrmCustomerOrderInfo�Top = 120
Left = 459
Height = 23
Width = 72
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
Caption = "\<Delete"
TabIndex = 11
Name = "cmdDelete"
WPROCEDURE Click
#DEFINE MSGBOX_YES		6
#DEFINE C_MSGBOX1		36
#DEFINE C_DELETE1_LOC	"Are you sure you want to delete the customer "
#DEFINE C_DELETE2_LOC   " and all the related orders?"

** Note that there is no RI procedures built-in to the testdata database
** so that there will be orphan records left in the orditems table after
** deleting the records from the Customer and Orders table.

lcMessage = C_DELETE1_LOC + ALLTRIM(Customer.Company) + C_DELETE2_LOC
lcCustomerID = Customer.cust_id

IF MESSAGEBOX(lcMessage,C_MSGBOX1) = MSGBOX_YES
	BEGIN TRANSACTION
	SELECT CUSTOMER
	DELETE
	IF !EOF()
		SKIP 1
	ENDIF
	IF EOF() AND !BOF()
		SKIP -1
	ENDIF
	SELECT ORDERS
	DELETE FOR cust_id = lcCustomerID

	END TRANSACTION
	THISFORM.Refresh
ENDIF
ENDPROC
PROCEDURE Error
LPARAMETERS nError, cMethod, nLine
ROLLBACK
ENDPROC
n�� UU%����UcT���-Are you sure you want to delete the customer C���� and all the related orders?��T������%�C��$�x��������F���
%�C+
����	H�����%�C+�C
	����
H�������F����������
�����U	LCMESSAGECUSTOMERCOMPANYLCCUSTOMERIDCUST_IDORDERSTHISFORMREFRESH�������UNERRORCMETHODNLINEClick,��Error���1:rQqA��A1�Aq�R�A2�A1 L)U
commandbutton
commandbuttoncmdNewOrderfrmCustomerOrderInfo�Top = 183
Left = 459
Height = 23
Width = 72
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
Caption = "Ne\<w"
TabIndex = 14
Name = "cmdNewOrder"
�PROCEDURE Error
LPARAMETERS nError, cMethod, nLine

MESSAGEBOX(MESSAGE())
ENDPROC
PROCEDURE Click
SELECT ORDERS

** Saves current TALK settings, Turns it off display to the screen
** (Prevents results of CALCULATE command from being issues to the screen
lcOldTalk = SET("TALK")
SET TALK OFF

** Saves current DELETED settings
** (Causes CALCULATE command to find the maximum number, included
** deleted records)
lcOldDeleted = SET("DELETED")
SET DELETED OFF

** Need to figure out next order_id
CALCULATE MAX(order_id) ALL TO lMaxID
lMaxID = ALLTRIM(STR(VAL(lMaxID) + 1))

** Insert new record
APPEND BLANK

** Update new record with customerID from customers table and new Order_id
REPLACE cust_id WITH Customer.Cust_id IN orders
REPLACE order_id with lMaxID in orders

** Restore talk setting
SET TALK &lcOldTalk
SET DELETED &lcOldDeleted

SELECT CUSTOMER
THISFORM.Refresh
ENDPROC
R�� 99*%����U�������CCE�x��UNERRORCMETHODNLINE�F��T��C�TALKv��G2�T��C�DELETEDv��G�}(������T��CCC�g�Z����>�������>������SET TALK &lcOldTalk
SET DELETED &lcOldDeleted
F��
���	�U
ORDERS	LCOLDTALKLCOLDDELETEDORDER_IDLMAXIDCUST_IDCUSTOMERINTHISFORMREFRESHError,��Clicke��1��2q4aeaqSCs�r�1Lh�)9
commandbutton
commandbuttoncmdDeleteOrderfrmCustomerOrderInfo�Top = 211
Left = 459
Height = 23
Width = 72
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
Caption = "De\<lete"
TabIndex = 15
Name = "cmdDeleteOrder"
�PROCEDURE Error
LPARAMETERS nError, cMethod, nLine

MESSAGEBOX(MESSAGE())
ENDPROC
PROCEDURE Click
#DEFINE MSGBOX_YES		6
#DEFINE C_MSGBOX1		36
#DEFINE C_DELETE1_LOC	"Are you sure you want to delete the order number "
#DEFINE C_DELETE2_LOC   "?"

** Note that there is no RI procedures built-in to the testdata database
** so that there will be orphan records left in the orditems table after
** deleting the records from the Customer and Orders table.

lcMessage = C_DELETE1_LOC + ALLTRIM(Orders.Order_id) + C_DELETE2_LOC
lcOrderID = Orders.order_id

IF MESSAGEBOX(lcMessage,C_MSGBOX1) = MSGBOX_YES
	SELECT ORDERS
	DELETE
	IF !EOF()
		SKIP 1
	ENDIF
	IF EOF() AND !BOF()
		SKIP -1
	ENDIF
	THISFORM.Refresh
ENDIF
ENDPROC
"�� 		�Q%n���U�������CCE�x��UNERRORCMETHODNLINE�LT���1Are you sure you want to delete the order number C����?��T������%�C��$�x�����F���
%�C+
����	H�����%�C+�C
	����
H�������
�����U	LCMESSAGEORDERSORDER_ID	LCORDERIDTHISFORMREFRESHError,��Clicke��1��2�rqA��A1�A�A1Lh�)	labellabelLabel5frmCustomerOrderInfo�AutoSize = .T.
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
Alignment = 1
Caption = " \<Customers "
Height = 15
Left = 15
Top = 74
Width = 57
TabIndex = 1
Name = "Label5"
textboxtextbox
txtCust_IDfrmCustomerOrderInfo�FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
ControlSource = "customer.cust_id"
Height = 23
Left = 87
TabIndex = 3
Top = 92
Width = 59
Name = "txtCust_ID"
textboxtextbox
txtCompanyfrmCustomerOrderInfo�FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
ControlSource = "customer.company"
Height = 23
Left = 205
TabIndex = 5
Top = 92
Width = 248
Name = "txtCompany"
textboxtextbox
txtContactfrmCustomerOrderInfo�FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
ControlSource = "customer.contact"
Height = 23
Left = 87
TabIndex = 7
Top = 120
Width = 366
Name = "txtContact"
labellabel
lblCust_IDfrmCustomerOrderInfo�AutoSize = .T.
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
BackStyle = 0
Caption = "Customer \<ID:"
Height = 15
Left = 21
Top = 96
Width = 63
TabIndex = 2
Name = "lblCust_ID"
labellabel
lblCompanyfrmCustomerOrderInfo�AutoSize = .T.
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
BackStyle = 0
Caption = "Com\<pany:"
Height = 15
Left = 152
Top = 96
Width = 49
TabIndex = 4
Name = "lblCompany"
labellabel
lblContactfrmCustomerOrderInfo�AutoSize = .T.
FontBold = .F.
FontName = "MS Sans Serif"
FontSize = 9
BackStyle = 0
Caption = "Con\<tact:"
Height = 15
Left = 21
Top = 123
Width = 42
TabIndex = 6
Name = "lblContact"
cmdclose..\solution.vcx
commandbutton	Cmdclose1frmCustomerOrderInfoSTop = 302
Left = 468
Height = 23
Width = 72
TabIndex = 18
Name = "Cmdclose1"
vcr..\solution.vcx	containerVcr1frmCustomerOrderInfo(Top = 302
Left = 346
Width = 104
Height = 24
TabIndex = 17
skiptable = customer
Name = "Vcr1"
cmdTop.Name = "cmdTop"
cmdPrior.Name = "cmdPrior"
cmdNext.Name = "cmdNext"
cmdBottom.Name = "cmdBottom"
Datachecker1.Height = 15
Datachecker1.Width = 23
Datachecker1.Name = "Datachecker1"
c_solutions..\solution.vcxcustomC_solutions1frmCustomerOrderInfoFTop = 307
Left = 94
Height = 18
Width = 25
Name = "C_solutions1"
behindscenes..\solution.vcx
commandbutton
Behindscenes1frmCustomerOrderInfo=Top = 302
Left = 12
TabIndex = 16
Name = "Behindscenes1"
shapeshapeShape2frmCustomerOrderInfobTop = 12
Left = 10
Height = 55
Width = 531
BackStyle = 0
SpecialEffect = 0
Name = "Shape2"
labellabelLabel1frmCustomerOrderInfo�FontName = "MS Sans Serif"
FontSize = 8
WordWrap = .T.
Caption = "Navigate the Customer records by clicking on the VCR buttons at the bottom of the form.  The related Order records are displayed below the customer information.  To add or delete records, click the appropriate buttons associated with each section."
Height = 41
Left = 20
Top = 21
Width = 517
TabIndex = 0
Name = "Label1"
labellabelLabel2frmCustomerOrderInfo�AutoSize = .T.
FontName = "MS Sans Serif"
FontSize = 8
Caption = " Instructions "
Height = 15
Left = 18
Top = 6
Width = 62
TabIndex = 0
Name = "Label2"
�Arial, 0, 9, 5, 15, 12, 32, 3, 0
MS Sans Serif, 0, 8, 5, 13, 11, 11, 2, 0
MS Sans Serif, 32, 8, 5, 13, 11, 11, 2, 0
MS Sans Serif, 0, 9, 5, 13, 11, 11, 2, 0
Courier New, 1, 11, 9, 17, 12, 11, 5, 0
�DataSession = 2
Top = 12
Left = 8
Height = 332
Width = 552
DoCreate = .T.
BorderStyle = 3
Caption = "Create a 1-to-Many Data Entry Form"
MaxButton = .F.
LockScreen = .F.
HelpContextID = 1231553
Name = "frmCustomerOrderInfo"