⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsyprg.prg

📁 出租车公司车辆管理系统
💻 PRG
字号:
************jsyprg.prg*********************
set default to a:
use jsy in 1 alias "a"


PUBLIC oform1
PUBLIC oform3
oform1=CREATEOBJECT("form1")
oform1.Show(1)
RETURN

DEFINE CLASS form1 AS form


	Height = 454
	Width = 633
	Desktop = .f.
	DoCreate = .T.
	AutoCenter = .T.
	Caption = "驾    驶    员    信    息    登    记    表"
	ControlBox = .f.
	Closable = .F.
	MaxButton = .F.
	MinButton = .f.
	
	WindowState = 2
	Name = "FORM1"


	ADD OBJECT label1 AS label WITH ;
		FontSize = 12, ;
		Caption = "姓名", ;
		Height = 25, ;
		Left = 24, ;
		Top = 24, ;
		Width = 49, ;
		Name = "Label1"


	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "a.xm", ;
		Height = 25, ;
		Left = 72, ;
		Top = 24, ;
		Width = 97, ;
		Name = "Text1"


	ADD OBJECT label2 AS label WITH ;
		FontSize = 12, ;
		Caption = "性别", ;
		Height = 25, ;
		Left = 216, ;
		Top = 24, ;
		Width = 49, ;
		Name = "Label2"


	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "a.xb", ;
		Height = 25, ;
		Left = 264, ;
		Top = 24, ;
		Width = 49, ;
		Name = "Text2"


	ADD OBJECT label3 AS label WITH ;
		FontSize = 12, ;
		Caption = "民族", ;
		Height = 25, ;
		Left = 360, ;
		Top = 24, ;
		Width = 49, ;
		Name = "Label3"


	ADD OBJECT text3 AS textbox WITH ;
		ControlSource = "a.mz", ;
		Height = 25, ;
		Left = 408, ;
		Top = 24, ;
		Width = 49, ;
		Name = "Text3"


	ADD OBJECT label4 AS label WITH ;
		FontSize = 12, ;
		Caption = "车牌号", ;
		Height = 25, ;
		Left = 528, ;
		Top = 24, ;
		Width = 48, ;
		Name = "Label4"


	ADD OBJECT text4 AS textbox WITH ;
		ControlSource = "a.cph", ;
		Height = 25, ;
		Left = 600, ;
		Top = 24, ;
		Width = 121, ;
		Name = "Text4"


	ADD OBJECT label5 AS label WITH ;
		FontSize = 12, ;
		Caption = "文化程度", ;
		Height = 25, ;
		Left = 24, ;
		Top = 84, ;
		Width = 72, ;
		Name = "Label5"


	ADD OBJECT text5 AS textbox WITH ;
		ControlSource = "a.whcd", ;
		Height = 25, ;
		Left = 108, ;
		Top = 84, ;
		Width = 85, ;
		Name = "Text5"


	ADD OBJECT label6 AS label WITH ;
		FontSize = 12, ;
		Caption = "政治面貌", ;
		Height = 25, ;
		Left = 240, ;
		Top = 84, ;
		Width = 72, ;
		Name = "Label6"


	ADD OBJECT text6 AS textbox WITH ;
		ControlSource = "a.zzmm", ;
		Height = 25, ;
		Left = 324, ;
		Top = 84, ;
		Width = 97, ;
		Name = "Text6"


	ADD OBJECT label7 AS label WITH ;
		FontSize = 12, ;
		Caption = "参加工作时间", ;
		Height = 25, ;
		Left = 480, ;
		Top = 84, ;
		Width = 97, ;
		Name = "Label7"


	ADD OBJECT text7 AS textbox WITH ;
		ControlSource = "a.gzsj", ;
		Height = 25, ;
		Left = 600, ;
		Top = 84, ;
		Width = 121, ;
		Name = "Text7"


	ADD OBJECT label8 AS label WITH ;
		FontSize = 12, ;
		Caption = "工作单位", ;
		Height = 25, ;
		Left = 24, ;
		Top = 144, ;
		Width = 85, ;
		Name = "Label8"


	ADD OBJECT text8 AS textbox WITH ;
		ControlSource = "a.dw", ;
		Height = 25, ;
		Left = 96, ;
		Top = 144, ;
		Width = 264, ;
		Name = "Text8"


	ADD OBJECT label9 AS label WITH ;
		FontSize = 12, ;
		Caption = "家庭住址", ;
		Height = 25, ;
		Left = 408, ;
		Top = 144, ;
		Width = 72, ;
		Name = "Label9"


	ADD OBJECT text9 AS textbox WITH ;
		ControlSource = "a.zz", ;
		Height = 25, ;
		Left = 492, ;
		Top = 144, ;
		Width = 265, ;
		Name = "Text9"


	ADD OBJECT label10 AS label WITH ;
		FontSize = 12, ;
		Caption = "联系方法", ;
		Height = 25, ;
		Left = 24, ;
		Top = 204, ;
		Width = 73, ;
		Name = "Label10"


	ADD OBJECT text10 AS textbox WITH ;
		ControlSource = "a.lxff", ;
		Height = 25, ;
		Left = 96, ;
		Top = 204, ;
		Width = 169, ;
		Name = "Text10"


	ADD OBJECT label11 AS label WITH ;
		FontSize = 12, ;
		Caption = " 领证时间", ;
		Height = 25, ;
		Left = 324, ;
		Top = 204, ;
		Width = 85, ;
		Name = "Label11"


	ADD OBJECT text11 AS textbox WITH ;
		ControlSource = "a.lzsj", ;
		Height = 25, ;
		Left = 408, ;
		Top = 204, ;
		Width = 97, ;
		Name = "Text11"


	ADD OBJECT label12 AS label WITH ;
		FontSize = 12, ;
		Caption = " 级  别", ;
		Height = 25, ;
		Left = 552, ;
		Top = 204, ;
		Width = 73, ;
		Name = "Label12"


	ADD OBJECT text12 AS textbox WITH ;
		ControlSource = "a.jb", ;
		Height = 25, ;
		Left = 624, ;
		Top = 204, ;
		Width = 97, ;
		Name = "Text12"


	ADD OBJECT label13 AS label WITH ;
		FontSize = 12, ;
		Caption = " 健康情况", ;
		Height = 25, ;
		Left = 12, ;
		Top = 264, ;
		Width = 73, ;
		Name = "Label13"


	ADD OBJECT text13 AS textbox WITH ;
		ControlSource = "a.jkqk", ;
		Height = 25, ;
		Left = 108, ;
		Top = 264, ;
		Width = 84, ;
		Name = "Text13"


	ADD OBJECT label14 AS label WITH ;
		FontSize = 12, ;
		Caption = " 左眼视力", ;
		Height = 25, ;
		Left = 264, ;
		Top = 264, ;
		Width = 85, ;
		Name = "Label14"


	ADD OBJECT text14 AS textbox WITH ;
		ControlSource = "a.zysl", ;
		Height = 25, ;
		Left = 360, ;
		Top = 264, ;
		Width = 97, ;
		Name = "Text14"


	ADD OBJECT label15 AS label WITH ;
		FontSize = 12, ;
		Caption = " 右眼视力", ;
		Height = 25, ;
		Left = 528, ;
		Top = 264, ;
		Width = 73, ;
		Name = "Label15"


	ADD OBJECT text15 AS textbox WITH ;
		ControlSource = "a.yysl", ;
		Height = 25, ;
		Left = 624, ;
		Top = 264, ;
		Width = 97, ;
		Name = "Text15"


	ADD OBJECT label16 AS label WITH ;
		FontSize = 12, ;
		Caption = "简 历", ;
		Height = 25, ;
		Left = 48, ;
		Top = 336, ;
		Width = 49, ;
		Name = "Label16"


	ADD OBJECT text16 AS textbox WITH ;
		Value = "", ;
		ControlSource = "a.jl", ;
		Height = 97, ;
		Left = 132, ;
		Top = 320, ;
		Width = 576, ;
		Style = 0, ;
		Name = "Text16"


	ADD OBJECT line1 AS line WITH ;
		BorderWidth = 2, ;
		Height = 430, ;
		Left = 12, ;
		Top = 12, ;
		Width = 0, ;
		BorderColor = RGB(80,80,80), ;
		Name = "Line1"


	ADD OBJECT line2 AS line WITH ;
		BorderWidth = 2, ;
		Height = 0, ;
		Left = 12, ;
		Top = 12, ;
		Width = 765, ;
		BorderColor = RGB(80,80,80), ;
		Name = "Line2"


	ADD OBJECT line3 AS line WITH ;
		BorderWidth = 2, ;
		Height = 0, ;
		Left = 12, ;
		Top = 442, ;
		Width = 765, ;
		BorderColor = RGB(228,228,228), ;
		Name = "Line3"


	ADD OBJECT line4 AS line WITH ;
		BorderWidth = 2, ;
		Height = 430, ;
		Left = 777, ;
		Top = 12, ;
		Width = 0, ;
		BorderColor = RGB(228,228,228), ;
		Name = "Line4"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 460, ;
		Left = 85, ;
		Height = 25, ;
		Width = 50, ;
		Caption = "上一条", ;
		Name = "Command1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 460, ;
		Left = 165, ;
		Height = 25, ;
		Width = 50, ;
		FontSize = 9, ;
		Caption = "下一条", ;
		Name = "Command2"


	ADD OBJECT command3 AS commandbutton WITH ;
		Top = 460, ;
		Left = 245, ;
		Height = 25, ;
		Width = 50, ;
		Caption = "修改", ;
		Name = "Command3"


	ADD OBJECT command4 AS commandbutton WITH ;
		Top = 460, ;
		Left = 325, ;
		Height = 25, ;
		Width = 50, ;
		Caption = "追加", ;
		Name = "Command4"


	ADD OBJECT command5 AS commandbutton WITH ;
		Top = 460, ;
		Left = 405, ;
		Height = 25, ;
		Width = 50, ;
		Caption = "删除", ;
		Name = "Command5"


	ADD OBJECT command6 AS commandbutton WITH ;
		Top = 460, ;
		Left = 485, ;
		Height = 25, ;
		Width = 50, ;
		Caption = "查询", ;
		Name = "Command6"


	
	ADD OBJECT command7 AS commandbutton WITH ;
		Top = 460, ;
		Left = 565, ;
		Height = 25, ;
		Width = 50, ;
		Caption = "打印", ;
		Name = "Command7"
	
	
	ADD OBJECT command8 AS commandbutton WITH ;
	    Top = 460, ;
  	    Left = 645, ;
	    Height = 25, ;
	    Width = 50, ;
	    Caption = "退出"
	    Name = "Command8"
	
	PROCEDURE Activate
		sele 1
	ENDPROC

	PROCEDURE Init
		
		set cursor off
		thisform.setall("readonly",.t.,"textbox")
	ENDPROC


	PROCEDURE command1.Click
		skip -1
		if bof()
		   go top
		   this.enabled=.f.
		endif
		if thisform.command2.enabled=.f.
			thisform.command2.enabled=.t.
		endif
		thisform.refresh
	ENDPROC


	PROCEDURE command2.Click
		skip 1
		if eof()
		 go bottom
		 this.enabled=.f.
		endif
		if thisform.command1.enabled=.f.
			thisform.command1.enabled=.t.
		endif
		thisform.refresh
	ENDPROC


	PROCEDURE command3.Click
		if this.caption="修改"
			thisform.setall("readonly",.f.,"textbox")
			set cursor on
			thisform.text1.setfocus
			this.caption="还原"
			thisform.setall("enabled",.f.,"commandbutton")
			thisform.command3.enabled=.t.
			thisform.refresh 
		else
			this.caption="修改"
			thisform.setall("readonly",.t.,"textbox")
			set cursor off
			thisform.setall("enabled",.t.,"commandbutton")
			thisform.refresh
		endif
	ENDPROC


	PROCEDURE command4.Click
		if this.caption="追加"
			set cursor on
			append blank
			thisform.setall("readonly",.f.,"textbox")
			thisform.text1.setfocus
			this.caption="保存"
			thisform.setall("enabled",.f.,"commandbutton")
			thisform.command4.enabled=.t.
			thisform.refresh
		else
			go top
			set cursor off
			thisform.setall("readonly",.t.,"textbox")
			this.caption="追加"
			thisform.setall("enabled",.t.,"commandbutton")
			thisform.refresh
		endif


	ENDPROC


    PROCEDURE command5.Click
                    if this.caption="删除"
                       thisform.setall("readonly",.f.,"textbox")
                       set cursor on
                       thisform.text1.setfocus                                 
                       this.caption="还原"
                       thisform.setall("enabled",.f.,"commandbutton")
                       thisform.refresh
                    else
                       this.caption="删除"                                    
                       thisform.setall("readomly",.t.,"textbox")
                       set cursor off
                       thisform.setall("enabled",.t.,"commandbutton")
                       thisform.refresh
                    endif
    ENDPROC
    


    PROCEDURE command6.Click
	
	oform3=CREATEOBJECT("form3")
     oform3.Show(1)
    return        
    
	ENDPROC

PROCEDURE command7.Click
	set device to printer
	set printer on prompt
	set device to screen
	set printer off
endproc

	PROCEDURE command8.Click
	
		release thisform
		
	ENDPROC


ENDDEFINE
*

*
DEFINE CLASS form3 AS form


	Height = 220
	Width = 420
	AutoCenter = .T.
	BorderStyle = 3
	Caption = "驾驶员信息查询"
	ControlBox = .F.
	Closable = .F.
	MaxButton = .F.
	MinButton = .F.
	Movable = .F.

	Name = "FORM3"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 156, ;
		Left = 84, ;
		Height = 37, ;
		Width = 73, ;
		Caption = "确 定", ;
		Name = "Command1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 156, ;
		Left = 240, ;
		Height = 37, ;
		Width = 73, ;
		Caption = "取 消", ;
		Name = "Command2"


	ADD OBJECT label1 AS label WITH ;
		FontSize = 14, ;
		Caption = "请选择要查询字段:", ;
		Height = 25, ;
		Left = 24, ;
		Top = 12, ;
		Width = 168, ;
		Name = "Label1"


	ADD OBJECT label2 AS label WITH ;
		FontSize = 12, ;
		Caption = "请输入要查找内容:", ;
		Height = 25, ;
		Left = 24, ;
		Top = 60, ;
		Width = 217, ;
		Name = "Label2"


	ADD OBJECT text1 AS textbox WITH ;
		FontSize = 14, ;
		Value = "", ;
		Height = 37, ;
		Left = 72, ;
		Top = 96, ;
		Width = 264, ;
		Name = "Text1"


	ADD OBJECT combo1 AS combobox WITH ;
		RowSourceType = 1, ;
		RowSource = "  姓    名,  车 牌 号,  工作单位,  级    别", ;
		Value = 1, ;
		Height = 25, ;
		Left = 204, ;
		Top = 12, ;
		Width = 96, ;
		Name = "Combo1"


	PROCEDURE activate

		set cursor on
		thisform.text1.setfocus
	ENDPROC


	PROCEDURE command1.Click
	sele 1
	if not empty(thisform.text1.value)
		oldrecn=recn()
		do case
			case thisform.Combo1.listitemid=1
				locate for alltrim(a.xm) $ alltrim(thisform.text1.value)	
			case thisform.Combo1.listitemid=2
				locate for cph=thisform.text1.value
			case thisform.Combo1.listitemid=3
				locate for dw=thisform.text1.value
			case thisform.Combo1.listitemid=4
				locate for jb=thisform.text1.value
		endcase
		if found()
			release thisform
			oform1.visible=.t.
			oform1.refresh
		else
			go oldrecn
			=messagebox('欲搜索的数据未能找到',16,'搜索')
			thisform.text1.value=''
		endif
	endif
	ENDPROC


	PROCEDURE command2.Click
		release thisform
		oform1.visible=.t.

	ENDPROC


	PROCEDURE combo1.GotFocus
		set cursor off
	ENDPROC


	PROCEDURE combo1.LostFocus
		set cursor on 
	ENDPROC


	PROCEDURE combo1.InteractiveChange
		thisform.text1.setfocus
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form3
**************************************************














⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -