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

📄 w_grdz_dj.srw

📁 一套PB开发的工商行政管理全套源码,包括企业登记,执照,案件管理等.
💻 SRW
📖 第 1 页 / 共 4 页
字号:
end if

datetime li_clrq,li_hzrq,li_yyqx1,li_yyqx2
li_clrq = dw_1.GetItemDateTime(row, "clrq") 
li_hzrq = dw_1.GetItemDateTime(row, "hzrq") 
li_yyqx1 = dw_1.GetItemDateTime(row, "yyqx1")
li_yyqx2 = dw_1.GetItemDateTime(row, "yyqx2")

//if li_clrq<>li_hzrq or li_clrq<>li_yyqx1 or li_hzrq<>li_yyqx1 then
//	MessageBox("提示","成立日期、核准日期、营业期限起始日期应保持一致!",Exclamation!, OKCancel!, 2)
//	return
//end if

if li_yyqx1>li_yyqx2 then
	MessageBox("提示","营业期限终止日期要大于营业期限起始日期!",Exclamation!, OKCancel!, 2)
	return
end if	

//
//if colname='zczb' then
//	gd_zczb=Dec(data)
//	if Dec(data)=0 then
//		this.object.ldzj[1]=0
//	end if
//end if
//
end event

event itemerror;String ls_colname			
String ls_colname_text
string ls_return,ls_type

ls_colname = dwo.name
ls_type = upper(left(dwo.ColType,4))
ls_colname_text=Describe(ls_colname + "_t.text" )
ls_return=f_datawindow_itemerror(ls_colname,ls_type,ls_colname_text,data)

if not isnull(ls_return) and len(ls_return)>0 then
   messagebox('提示信息',ls_return)
else
end if
return 1
end event

event losefocus;this.Accepttext()
end event

event user_enter;Send(handle(this),256,9,long(0,0))
return 1
end event

event user_post;datetime coldate
string colname,str

Setnull(str)
Setnull(coldate)
CHOOSE CASE message.wordparm
	CASE 1
		this.Setitem(1,'zch',str)
		this.Setcolumn('zch')
	CASE 3
		this.Setitem(1,'qylx',str)
		this.Setcolumn('qylx')
	CASE 4
		this.Setitem(1,'clrq',coldate)
		this.Setcolumn('clrq')
	CASE 5
		this.Setitem(1,'hzrq',coldate)
		this.Setcolumn('hzrq')
	CASE 91
		tab_1.selectedtab=1
		this.Setitem(1,'zs',thasc)
	CASE 92
		tab_1.selectedtab=1
		this.Setitem(1,'jyfw',thasc)
	CASE 93
		tab_1.selectedtab=1
		this.Setitem(1,'jyfw2',thasc)		
	CASE ELSE
		colname=this.Getcolumnname()
		this.Setitem(1,colname,coldate)
END CHOOSE


end event

event clicked;string ls_type,ls_tj
datawindowchild ldwc_hydm

if row < 1 then return						//如果没有数据则返回
ls_type = dwo.type							//获取当前点击对象的类型
this.accepttext()

if dwo.name="hydm" then
	if not isnull(this.object.hyml[this.getrow()]) then
		this.getchild("hydm",ldwc_hydm)
		ldwc_hydm.settransobject(sqlca)
		ldwc_hydm.retrieve()
		ls_tj=this.getitemstring(1,"hyml")
		ls_tj=left(ls_tj,1)
		ldwc_hydm.setfilter(" left(bm,1)= '"+ls_tj+"'")
		ldwc_hydm.filter()
	end if
end if
end event

type tabpage_legal from userobject within tab_1
event constructor pbm_constructor
event create ( )
event destroy ( )
integer x = 18
integer y = 96
integer width = 3447
integer height = 1580
long backcolor = 80269524
string text = "负责人"
long tabtextcolor = 33554432
long tabbackcolor = 80269524
long picturemaskcolor = 536870912
dw_legal dw_legal
end type

event constructor;//取得数据
tab_1.tabpage_legal.dw_legal.settransobject(sqlca)
tab_1.tabpage_legal.dw_legal.insertrow(0)
setfocus(tab_1.tabpage_legal.dw_legal)

////由于修改与登录在一起,所以以下程序用以判断在该叶的数据窗口对应的库中是否
////已存在该企业的情况,有则取出
if qy.nbxh<>'' then
	string oldstr,newstr
	int cot
	//在公司登记库中查找是否已存在记录
	SELECT COUNT(*) INTO :cot FROM a_fzrll WHERE nbxh=:qy.nbxh AND zzrq IS NULL ;
	if sqlca.sqlcode=0 and cot>0 then//找到
		oldstr =this.dw_legal.Getsqlselect()//取得原SQL语句
		oldstr=fn_oldsql(oldstr)//截掉where子句
		newstr =oldstr + " where nbxh='" + qy.nbxh +"' and zzrq is null"//新的SQL语句
		this.dw_legal.Setsqlselect(newstr)//将新的SQL语句放入数据窗口
		this.dw_legal.Reset()
		this.dw_legal.Retrieve()//取出值
		this.dw_legal.Setfocus()
		//修改标志
		dw_retrieve[tab_1.selectedtab]='1'
	end if
end if

end event

on tabpage_legal.create
this.dw_legal=create dw_legal
this.Control[]={this.dw_legal}
end on

on tabpage_legal.destroy
destroy(this.dw_legal)
end on

type dw_legal from datawindow within tabpage_legal
event dberror pbm_dwndberror
event editchanged pbm_dwnchanging
event itemchanged pbm_dwnitemchange
event itemerror pbm_dwnitemvalidationerror
event user_keyenter pbm_dwnprocessenter
event user_post ( )
integer x = 315
integer y = 172
integer width = 2917
integer height = 1244
integer taborder = 12
string dataobject = "dw_gr_fzrll"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

event dberror;return 2
end event

event editchanged;if data="" or data="0000.00.00" then fn_editchanged(this,data)
if Isnull(data) then fn_editchanged(this,"")
end event

event itemchanged;string colname,xm
datetime coldate
string ls_type,ls_colname_text,ls_return,ls_colname
String ls_zjmc

THIS.AcceptText ( )
//以下检测身份证号码是否合法
ls_zjmc = trim(this.object.zjmc[row])
//如果证件名称是身份证或未赋值则默认是身份证,再检测身份证是否合法
if dwo.name = "zjhm" and (ls_zjmc = "0" or ls_zjmc="身份证" or isnull(ls_zjmc) or len(ls_zjmc) = 0 ) then
	this.object.zjmc[row] = "0"
	if not gf_check_identity(data) then	Return 1
end if
//cb_save.enabled = TRUE
if lower(dwo.coltype)='date' or lower(dwo.coltype)='datetime' then
	ls_colname = dwo.name
	ls_type = upper(left(dwo.ColType,4))
	ls_colname_text=Describe(ls_colname + "_t.text" )
	ls_return=f_datawindow_itemerror(ls_colname,ls_type,ls_colname_text,data)
	if not isnull(ls_return) and len(ls_return)>0 then
		messagebox('提示信息',ls_return)
		return 1
	end if
end if
colname=dw_legal.Getcolumnname()

//输入的姓名必需与基本信息的法定代表人一致
if colname='xm' then
		tab_1.tabpage_detail.dw_1.object.fddbr[1]=data
end if

if colname='tzse' then
		tab_1.tabpage_detail.dw_1.object.zczb[1]=tab_1.tabpage_legal.dw_legal.object.tzse[1]
end if

//核准日期不能大于操作日期
if colname='hzrq' then
	if Daysafter(Date(Mid(data,1,10)),Today())<0 then
		Setnull(coldate)	
		dw_legal.setitem(1,'hzrq',coldate)
		dw_legal.Setcolumn("hzrq")
		dw_legal.Setfocus()
		return 1
	end if
end if

end event

event itemerror;String ls_colname			
String ls_colname_text
string ls_return,ls_type

ls_colname = dwo.name
ls_type = upper(left(dwo.ColType,4))
ls_colname_text=Describe(ls_colname + "_t.text" )
ls_return=f_datawindow_itemerror(ls_colname,ls_type,ls_colname_text,data)

if not isnull(ls_return) and len(ls_return)>0 then
   messagebox('提示信息',ls_return)
else
end if
return 1
end event

event user_keyenter;string colname
colname=this.Getcolumnname()
if colname='jl' then
	return 1
end if

Send(handle(this),256,9,long(0,0))
return
end event

event user_post;datetime coldate
string colname

colname=this.Getcolumnname()

Setnull(coldate)
this.Setitem(1,colname,coldate)
end event

type tabpage_1 from userobject within tab_1
event constructor pbm_constructor
integer x = 18
integer y = 96
integer width = 3447
integer height = 1580
long backcolor = 80269524
string text = "分支机构"
long tabtextcolor = 33554432
long tabbackcolor = 80269524
long picturemaskcolor = 536870912
st_3 st_3
dw_2 dw_2
end type

event constructor;dw_2.settransobject(sqlca)
end event

on tabpage_1.create
this.st_3=create st_3
this.dw_2=create dw_2
this.Control[]={this.st_3,&
this.dw_2}
end on

on tabpage_1.destroy
destroy(this.st_3)
destroy(this.dw_2)
end on

type st_3 from statictext within tabpage_1
boolean visible = false
integer x = 434
integer y = 664
integer width = 2487
integer height = 172
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 255
long backcolor = 12632256
boolean enabled = false
string text = "该企业无分支机构!"
alignment alignment = center!
boolean focusrectangle = false
end type

type dw_2 from datawindow within tabpage_1
integer x = 233
integer y = 272
integer width = 3035
integer height = 796
integer taborder = 13
string dataobject = "dw_gr_fzjg2"
boolean hscrollbar = true
boolean vscrollbar = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

event itemchanged;This.SelectRow(0, FALSE)
This.SelectRow(row, TRUE)
string ls_type,ls_colname_text,ls_return,ls_colname
//cb_save.enabled = TRUE
if lower(dwo.coltype)='date' or lower(dwo.coltype)='datetime' then
	ls_colname = dwo.name
	ls_type = upper(left(dwo.ColType,4))
	ls_colname_text=Describe(ls_colname + "_t.text" )
	ls_return=f_datawindow_itemerror(ls_colname,ls_type,ls_colname_text,data)
	if not isnull(ls_return) and len(ls_return)>0 then
		messagebox('提示信息',ls_return)
		return 1
	end if
end if
end event

event itemerror;String ls_colname			
String ls_colname_text
string ls_return,ls_type

ls_colname = dwo.name
ls_type = upper(left(dwo.ColType,4))
ls_colname_text=Describe(ls_colname + "_t.text" )
ls_return=f_datawindow_itemerror(ls_colname,ls_type,ls_colname_text,data)

if not isnull(ls_return) and len(ls_return)>0 then
   messagebox('提示信息',ls_return)
else
end if
return 1
end event

type tabpage_jtcy from userobject within tab_1
integer x = 18
integer y = 96
integer width = 3447
integer height = 1580
long backcolor = 80269524
string text = "家庭成员"
long tabtextcolor = 33554432
long tabbackcolor = 80269524
long picturemaskcolor = 536870912
uo_1 uo_1
end type

on tabpage_jtcy.create
this.uo_1=create uo_1
this.Control[]={this.uo_1}
end on

on tabpage_jtcy.destroy
destroy(this.uo_1)
end on

type uo_1 from uo_list_detail within tabpage_jtcy
integer x = 37
integer y = 36
integer taborder = 13
boolean border = false
long backcolor = 80269524
end type

event constructor;call super::constructor;integer li_index 

//取得数据
this.dw_list.dataobject = 'dw_grdz_jtcy'
this.dw_list.settransobject(sqlca)
this.dw_detail.dataobject = 'dw_grdz_jtcy_detail'
this.dw_detail.settransobject(sqlca)
this.dw_list.sharedata(this.dw_detail)

li_index = Integer(this.dw_list.Object.DataWindow.Column.Count)
do while li_index > 0 
	this.dw_list.SetTabOrder(li_index,0)
	li_index --
loop
gf_Set_Bg(this.dw_list)
//由于修改与登录在一起,所以以下程序用以判断在该叶的数据窗口对应的库中是否
//已存在该企业的情况,有则取出
if qy.nbxh<>'' then
	string oldstr,newstr
	int cot
	//在公司登记库中查找是否已存在记录
	SELECT COUNT(*) INTO :cot FROM a_zyryqk WHERE nbxh=:qy.nbxh ;
	if sqlca.sqlcode=0 and cot>0 then//找到
		oldstr =this.dw_list.Getsqlselect()//取得原SQL语句
		oldstr=fn_oldsql(oldstr)//截掉where子句
		newstr =oldstr + " where nbxh='" + qy.nbxh +"'"//新的SQL语句
		this.dw_list.Setsqlselect(newstr)//将新的SQL语句放入数据窗口
//		this.dw_list.Reset()
		this.dw_list.Retrieve()//取出值
		this.dw_list.Setfocus()
		//修改标志
		//dw_retrieve[tab_1.selectedtab]='1'
	end if
end if
//


end event

on uo_1.destroy
call uo_list_detail::destroy
end on

type cb_bzsm from commandbutton within w_grdz_dj
event clicked pbm_bnclicked
boolean visible = false
integer x = 1102
integer y = 2032
integer width = 384
integer height = 92
integer taborder = 50
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "&B.备注说明"
end type

event clicked;Messagebox("企 业 说 明 信 息",smbz)
end event

type st_name from statictext within w_grdz_dj
boolean visible = false
integer x = 754
integer y = 72
integer width = 2661
integer height = 100
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"

⌨️ 快捷键说明

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