Смекни!
smekni.com

АРМ менеджера по продажам комплектующих (стр. 6 из 6)

THISFORM.pageframe1.page3.txtValue3.Value = ""

THISFORM.pageframe1.page3.cboField3.Enabled =.F.

THISFORM.pageframe1.page3.cboRelation3.Enabled =.F.

THISFORM.pageframe1.page3.txtValue3.Enabled =.F.

THISFORM.pageframe1.page3.cmdClear.Enabled =.F.

THISFORM.pageframe1.page3.cmdExecute.Enabled =.F.

Form1.Settexboxformat

LPARAMETERS oSource, oTxt

LOCAL lcType

oTxt.Value = ""

lcType = TYPE(oSource.Value)

DO CASE

CASE lcType = "D"

oTxt.Format = "D"

CASE lcType = "L"

oTxt.Inputmask = ".T.,.F."

oTxt.Format = "M"

CASE lcType = "T"

oTxt.Inputmask = "99/99/99 99:99:99"

ENDCASE

Form1.validatetype

LPARAMETERS lField, lcValue

LOCAL lcType

lcType = TYPE(lField)

DO CASE

CASE lcType $ "CM"

lcValue = CHR(34) + lcValue + CHR(34)

CASE lcType $ "DT"

lcValue = "{" + lcValue + "}"

CASE lcType $ "NY"

IF EMPTY(lcValue)

lcValue = "0"

ENDIF

CASE lcType $ "L"

IF!INLIST(UPPER(lcValue), ".T.", ".F.")

lcValue = ".T."

ENDIF

ENDCASE

RETURN lcValue

Form1.PageFrame1.Grid1.Column1.Header1.MouseUp

LPARAMETERS nButton, nShift, nXCoord, nYCoord

IF nShift = 2

SET ORDER TO razdel DESCENDING

ELSE

SET ORDER TO razdel ASCENDING

ENDIF

GO TOP

THISFORM.Refresh

Form1.PageFrame1.Grid1.Column2.Header1.MouseUp

LPARAMETERS nButton, nShift, nXCoord, nYCoord

IF nShift = 2

SET ORDER TO pozic DESCENDING

ELSE

SET ORDER TO pozic ASCENDING

ENDIF

GO TOP

THISFORM.Refresh

Form1.PageFrame1.Grid1.Column3.Header1.MouseUp

LPARAMETERS nButton, nShift, nXCoord, nYCoord

IF nShift = 2

SET ORDER TO garant DESCENDING

ELSE

SET ORDER TO garant ASCENDING

ENDIF

GO TOP

THISFORM.Refresh

Form1.PageFrame1.Grid1.Column4.Header1.MouseUp

LPARAMETERS nButton, nShift, nXCoord, nYCoord

IF nShift = 2

SET ORDER TO cena_1 DESCENDING

ELSE

SET ORDER TO cena_1 ASCENDING

ENDIF

GO TOP

THISFORM.Refresh

Form1.PageFrame1.Page2.Activate

this.refresh

Form1.PageFrame1.Page2.commandgroup1.Command1.Click

go top

if BOF ()

MESSAGEBOX("Вы достигли первой записи",0+64+0,"Уведомление")

endif

_screen.activeForm.refresh()

Form1.PageFrame1.Page2.commandgroup1.Command2.Click

if!bof()

skip -1

else

MESSAGEBOX("Вы достигли первой записи",0+64+0,"Уведомление")

endif

_screen.activeForm.refresh()

Form1.PageFrame1.Page2.commandgroup1.Command3.Click

hisform.pageframe1.page2.command1.visible =.T.

thisform.pageframe1.page2.cmdCancel.visible =.T.

thisform.pageframe1.page2.text1.readonly =.F.

thisform.pageframe1.page2.text2.readonly =.F.

thisform.pageframe1.page2.text3.readonly =.F.

thisform.pageframe1.page2.text4.readonly =.F.

thisform.pageframe1.page2.text5.readonly =.F.

thisform.pageframe1.page2.text6.readonly =.F.

thisform.pageframe1.page2.text7.readonly =.F.

thisform.pageframe1.page2.commandgroup1.command1.enabled =.F.

thisform.pageframe1.page2.commandgroup1.command2.enabled =.F.

thisform.pageframe1.page2.commandgroup1.command3.enabled =.F.

thisform.pageframe1.page2.commandgroup1.command4.enabled =.F.

thisform.pageframe1.page2.commandgroup1.command5.enabled =.F.

thisform.pageframe1.page2.commandgroup1.command6.enabled =.F.

thisform.pageframe1.page2.commandgroup1.command7.enabled =.F.

Form1.PageFrame1.Page2.commandgroup1.Command4.Click

append blank

thisform.refresh

thisform.pageframe1.page2.commandgroup1.command3.Click

Form1.PageFrame1.Page2.commandgroup1.Command5.Click

if messagebox("Вы действительно хотите удалить эту запись?", 4+48+256, "Комплектующие")=6

delete

reindex

thisform.pageframe1.page1.grid1.Refresh

thisform.refresh

thisform.pageframe1.ActivePage = 1

endif

Form1.PageFrame1.Page2.commandgroup1.Command6.Click

skip

if!eof()

skip

else

MESSAGEBOX("Вы достигли последней записи",0+64+0,"Уведомление")

skip-1

thisform.Refresh()

endif

thisform.Refresh()

Form1.PageFrame1.Page2.commandgroup1.Command7.Click

go bottom

thisform.pageframe1.page2.Refresh

Form1.PageFrame1.Page2..Command1.Click

thisform.pageframe1.page2.command1.visible =.F.

pozic = thisform.pageframe1.page2.text2.value

razdel = thisform.pageframe1.page2.text1.value

charakt= thisform.pageframe1.page2.text3.value

garant = thisform.pageframe1.page2.text4.value

cena_1 = thisform.pageframe1.page2.text5.value

cena_2 = thisform.pageframe1.page2.text6.value

cena_3 = thisform.pageframe1.page2.text7.value

thisform.pageframe1.page1.grid1.refresh

thisform.pageframe1.page2.text1.readonly =.T.

thisform.pageframe1.page2.text2.readonly =.T.

thisform.pageframe1.page2.text3.readonly =.T.

thisform.pageframe1.page2.text4.readonly =.T.

thisform.pageframe1.page2.text5.readonly =.T.

thisform.pageframe1.page2.text6.readonly =.T.

thisform.pageframe1.page2.text7.readonly =.T.

thisform.pageframe1.page2.commandgroup1.command1.enabled =.T.

thisform.pageframe1.page2.commandgroup1.command2.enabled =.T.

thisform.pageframe1.page2.commandgroup1.command3.enabled =.T.

thisform.pageframe1.page2.commandgroup1.command4.enabled =.T.

thisform.pageframe1.page2.commandgroup1.command5.enabled =.T.

thisform.pageframe1.page2.commandgroup1.command6.enabled =.T.

thisform.pageframe1.page2.commandgroup1.command7.enabled =.T.

thisform.pageframe1.ActivePage = 1

Form1.PageFrame1.Page3.cboField1.InteractiveChange

THISFORM.SetTextboxFormat(THIS, THISFORM.pageframe1.page3.txtValue1)

THISFORM.BldSQL

Form1.PageFrame1.Page3.cboField2.InteractiveChange

THISFORM.SetTextboxFormat(THIS, THISFORM.pageframe1.page3.txtValue2)

THISFORM.BldSQL

Form1.PageFrame1.Page3.cboField3.InteractiveChange

THISFORM.SetTextboxFormat(THIS, THISFORM.pageframe1.page3.txtValue3)

THISFORM.BldSQL

Form1.PageFrame1.Page3.cboRelation1.InteractiveChange

THISFORM.BldSQL

Form1.PageFrame1.Page3.cboRelation2.InteractiveChange

THISFORM.BldSQL

Form1.PageFrame1.Page3.cboRelation3.InteractiveChange

THISFORM.BldSQL

Form1.PageFrame1.Page3.txtValue1

THISFORM.BldSQL

Form1.PageFrame1.Page3.txtValue2

THISFORM.BldSQL

Form1.PageFrame1.Page3.txtValue3

THISFORM.BldSQL

Form1.PageFrame1.Page3.opgOperand1. InteractiveChange

THISFORM.pageframe1.page3.cboField2.Enabled =.T.

THISFORM.pageframe1.page3.cboRelation2.Enabled =.T.

THISFORM.pageframe1.page3.txtValue2.Enabled =.T.

THISFORM.BldSQL

Form1.PageFrame1.Page3.opgOperand2. InteractiveChange

THISFORM.pageframe1.page3.cboField3.Enabled =.T.

THISFORM.pageframe1.page3.cboRelation3.Enabled =.T.

THISFORM.pageframe1.page3.txtValue3.Enabled =.T.

THISFORM.BldSQL

Form1.PageFrame1.Page3.cmdExecute.Click

LOCAL lcOldAlias

lcOldAlias = ALIAS()

cMacro = ALLTRIM(THISFORM.DataSql) + "INTO CURSOR TEMPQUERY"

&cMacro

IF _TALLY = 0

#DEFINE MSG_LOC "No records were found to match the criteria you specified."

#DEFINE TITLE_LOC "No Results"

=MESSAGEBOX(MSG_LOC,64+0+0,TITLE_LOC)

ELSE

BROWSE NORMAL TITLE SUBSTR(THISFORM.DataSql, AT("WHERE",THISFORM.DataSql)+ 6)

ENDIF

IF USED("TEMPQUERY")

USE IN TEMPQUERY

ENDIF

IF USED(lcOldAlias)

SELECT (lcOldAlias)

ENDIF

Form1.PageFrame1.Page3.cmdClear.Click

THISFORM.ClearSQL

Form1.FormExit.Click

thisform.release

Main Menu

LPARAMETERS oFormRef, getMenuName, lUniquePopups, parm4, parm5, parm6, parm7, parm8, parm9

LOCAL cMenuName, nTotPops, a_menupops, cTypeParm2, cSaveFormName

IF TYPE("m.oFormRef") # "O" OR;

LOWER(m.oFormRef.BaseClass) # 'form' OR;

m.oFormRef.ShowWindow # 2

MESSAGEBOX([This menu can only be called from a Top-Level form. Ensure that your form's ShowWindow property is set to 2. Read the header section of the menu's MPR file for more details.])

RETURN

ENDIF

m.cTypeParm2 = TYPE("m.getMenuName")

m.cMenuName = SYS(2015)

m.cSaveFormName = m.oFormRef.Name

IF m.cTypeParm2 = "C" OR (m.cTypeParm2 = "L" AND m.getMenuName)

m.oFormRef.Name = m.cMenuName

ENDIF

IF m.cTypeParm2 = "C" AND!EMPTY(m.getMenuName)

m.cMenuName = m.getMenuName

ENDIF

DIMENSION a_menupops[3]

IF TYPE("m.lUniquePopups")="L" AND m.lUniquePopups

FOR nTotPops = 1 TO ALEN(a_menupops)

a_menupops[m.nTotPops]= SYS(2015)

ENDFOR

ELSE

a_menupops[1]="file"

a_menupops[2]="edit"

a_menupops[3]="help"

ENDIF

LOCAL lHasNewMenu

lHasNewMenu = (TYPE("CNTPAD(m.cMenuName)") # "N")

IF m.lHasNewMenu

DEFINE MENU (m.cMenuName) IN (m.oFormRef.Name) BAR

ENDIF

DEFINE PAD _03s1d879u OF (m.cMenuName) PROMPT "&bsol;<File" COLOR SCHEME 3;

KEY ALT+F, ""

DEFINE PAD _03s1d879v OF (m.cMenuName) PROMPT "&bsol;<Edit" COLOR SCHEME 3;

KEY ALT+E, ""

DEFINE PAD _03s1d879w OF (m.cMenuName) PROMPT "&bsol;<Query" COLOR SCHEME 3;

KEY ALT+Q, ""

DEFINE PAD _03s1d879x OF (m.cMenuName) PROMPT "&bsol;<Help" COLOR SCHEME 3;

KEY ALT+H, ""

ON PAD _03s1d879u OF (m.cMenuName) ACTIVATE POPUP (a_menupops[1])

ON PAD _03s1d879v OF (m.cMenuName) ACTIVATE POPUP (a_menupops[2])

ON SELECTION PAD _03s1d879w OF (m.cMenuName);

DO _03s1d879z;

IN LOCFILE("MY&bsol;MENU1","MPX;MPR|FXP;PRG","WHERE is MENU1?")

ON PAD _03s1d879x OF (m.cMenuName) ACTIVATE POPUP (a_menupops[3])

DEFINE POPUP (a_menupops[1]) MARGIN RELATIVE SHADOW COLOR SCHEME 4

DEFINE BAR 1 OF (a_menupops[1]) PROMPT "&bsol;<Quit";

MESSAGE "Выходизпрограммы"

ON SELECTION BAR 1 OF (a_menupops[1]);

DO _03s1d87a4;

IN LOCFILE("MY&bsol;MENU1","MPX;MPR|FXP;PRG","WHERE is MENU1?")

DEFINE POPUP (a_menupops[2]) MARGIN RELATIVE SHADOW COLOR SCHEME 4

DEFINE BAR 1 OF (a_menupops[2]) PROMPT "&bsol;<Add record"

DEFINE BAR 2 OF (a_menupops[2]) PROMPT "&bsol;<Delete record"

DEFINE BAR 3 OF (a_menupops[2]) PROMPT "&bsol;<Edit record"

ON SELECTION BAR 1 OF (a_menupops[2]);

DO _03s1d87a6;

IN LOCFILE("MY&bsol;MENU1","MPX;MPR|FXP;PRG","WHERE is MENU1?")

ON SELECTION BAR 2 OF (a_menupops[2]);

DO _03s1d87a8;

IN LOCFILE("MY&bsol;MENU1","MPX;MPR|FXP;PRG","WHERE is MENU1?")

ON SELECTION BAR 3 OF (a_menupops[2]);

DO _03s1d87aa;

IN LOCFILE("MY&bsol;MENU1","MPX;MPR|FXP;PRG","WHERE is MENU1?")

DEFINE POPUP (a_menupops[3]) MARGIN RELATIVE SHADOW COLOR SCHEME 4

DEFINE BAR 1 OF (a_menupops[3]) PROMPT "&bsol;<About"

ON SELECTION BAR 1 OF (a_menupops[3]);

DO _03s1d87ac;

IN LOCFILE("MY&bsol;MENU1","MPX;MPR|FXP;PRG","WHERE is MENU1?")

ACTIVATE MENU (m.cMenuName) NOWAIT

IF m.cTypeParm2 = "C"

m.getMenuName = m.cMenuName

m.oFormRef.Name = m.cSaveFormName

ENDIF

PROCEDURE _03s1d879z

mainform.pageframe1.Activepage = 3

PROCEDURE _03s1d87a4

mainform.release

PROCEDURE _03s1d87a6

mainform.pageframe1.Activepage = 2

mainform.pageframe1.page2.commandgroup1.command4.Click()

PROCEDURE _03s1d87a8

mainform.pageframe1.Activepage = 2

mainform.pageframe1.page2.commandgroup1.command5.Click(PROCEDURE _03s1d87aa

mainform.pageframe1.Activepage = 2

mainform.pageframe1.page2.commandgroup1.command3.Click

PROCEDURE _03s1d87ac

do form Fabout.scx