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

📄 u_jcremote.sru

📁 某 房 产 公 司 售 楼 管 理 系 统
💻 SRU
字号:
$PBExportHeader$u_jcremote.sru
$PBExportComments$稽查远程对象
forward
global type u_jcremote from nonvisualobject
end type
end forward

global type u_jcremote from nonvisualobject
end type
global u_jcremote u_jcremote

forward prototypes
public function blob uf_picture_select (string cph, string table, string colum)
public function integer uf_wztzdsave (ref stru_wztzd wztzd[])
public function integer uf_jcdelete (string dataobject, string str_zonghe)
public function integer uf_zkclsave (ref stru_zkcl zkcl[])
public function long uf_zkclretrieve (ref stru_zkcl zkcl[], string str_cph)
public function long uf_jccxgy (string select_cx, ref stru_jccxgy jccxgy[])
public function long uf_wzretieve (string pzh)
public function long uf_wztzdretrieve (ref stru_wztzd wztzd[], string pzh)
public function long uf_wztzdcx (string select_cx, ref str_wztzdcx wztzdcx[])
end prototypes

public function blob uf_picture_select (string cph, string table, string colum);blob lb_zp
//读出空白照片
int filenb
blob lb_file
string s_filename

s_filename="beijing.bmp"
filenb=fileopen(s_filename,streammode!,read!,lockread!)
fileread(filenb,lb_file)
fileclose(filenb)
//

choose case table
	case "z_clczqk"
		choose case colum
			case "cz"
				selectblob czzp into :lb_zp from z_clczqk where cph=:cph;
				if sqlca.sqlcode<>0 then
					return lb_file
				else
					return lb_zp
				end if
			case "cl"
				selectblob clzp into :lb_zp from z_clczqk where cph=:cph;
				if sqlca.sqlcode<>0 then
					return lb_file
				else
					return lb_zp
				end if
			case else
				return lb_file
		end choose				
	case "z_jsycwy"
		choose case colum
			case "jsy1"
				selectblob jsy1zp into :lb_zp from z_jsycwy where cph=:cph;
				if sqlca.sqlcode<>0 then
					return lb_file
				else
					return lb_zp
				end if
			case "jsy2"
				selectblob jsy2zp into :lb_zp from z_jsycwy where cph=:cph;
				if sqlca.sqlcode<>0 then
					return lb_file
				else
					return lb_zp
				end if
			case "cwy"
				selectblob cwyzp into :lb_zp from z_jsycwy where cph=:cph;
				if sqlca.sqlcode<>0 then
					return lb_file
				else
					return lb_zp
				end if
			case else
				return lb_file
		end choose
	case else
		return lb_file
end choose

end function

public function integer uf_wztzdsave (ref stru_wztzd wztzd[]);datastore ds_zkcl
ds_zkcl=create datastore

ds_zkcl.dataobject="dw_wztzd"
ds_zkcl.settrans(sqlca)
ds_zkcl.object.data=wztzd
if ds_zkcl.update()=1 then
	commit;
	return 1
else
	rollback;
	return -1
end if
end function

public function integer uf_jcdelete (string dataobject, string str_zonghe);long l_count
datastore ds_zonghe

ds_zonghe=create datastore
ds_zonghe.dataobject=dataobject
ds_zonghe.settrans(sqlca)
l_count=ds_zonghe.retrieve(str_zonghe)

if l_count=1 then
	ds_zonghe.deleterow(1)
else 
	return -1
end if
if ds_zonghe.update()=1 then
		commit;
		return 1
	else
		rollback;
		return -1
	end if

end function

public function integer uf_zkclsave (ref stru_zkcl zkcl[]);datastore ds_zkcl
ds_zkcl=create datastore

ds_zkcl.dataobject="dw_zkcltzd"
ds_zkcl.settrans(sqlca)
ds_zkcl.object.data=zkcl
if ds_zkcl.update()=1 then
	commit;
	return 1
else
	rollback;
	return -1
end if

end function

public function long uf_zkclretrieve (ref stru_zkcl zkcl[], string str_cph);long l_wztzd
datastore ds_wztzdcx

ds_wztzdcx=create datastore
ds_wztzdcx.dataobject="dw_zkcltzd"
ds_wztzdcx.settrans(sqlca)
l_wztzd=ds_wztzdcx.retrieve(str_cph)
if l_wztzd>0 then
zkcl=ds_wztzdcx.object.data
end if
return l_wztzd

end function

public function long uf_jccxgy (string select_cx, ref stru_jccxgy jccxgy[]);long l_wztzd
datastore ds_wztzdcx

ds_wztzdcx=create datastore
ds_wztzdcx.dataobject="dw_jccxgy"
ds_wztzdcx.settrans(sqlca)
ds_wztzdcx.setsqlselect(select_cx)
l_wztzd=ds_wztzdcx.retrieve()
if l_wztzd>0 then
jccxgy=ds_wztzdcx.object.data
end if
return l_wztzd

end function

public function long uf_wzretieve (string pzh);string s_cph
select cph into :s_cph from wztzd where cph=:pzh;
if sqlca.sqlcode=0 then
	return 1
else
	return -1
end if
end function

public function long uf_wztzdretrieve (ref stru_wztzd wztzd[], string pzh);long l_wztzd
datastore ds_wztzdcx

ds_wztzdcx=create datastore
ds_wztzdcx.dataobject="dw_wztzd"
ds_wztzdcx.settrans(sqlca)
l_wztzd=ds_wztzdcx.retrieve(pzh)
if l_wztzd>0 then
wztzd=ds_wztzdcx.object.data
end if
return l_wztzd

end function

public function long uf_wztzdcx (string select_cx, ref str_wztzdcx wztzdcx[]);long l_wztzd
string statement
statement="SELECT wztzd.name,wztzd.uint,wztzd.cx,wztzd.pzh,wztzd.clresult,wztzd.wzreason,wztzd.wzdate,wztzd.wzaddress, wztzd.jsr,wztzd.notyes,wztzd.number1 FROM wztzd "&
	+ select_cx
datastore ds_wztzdcx

ds_wztzdcx=create datastore
ds_wztzdcx.dataobject="rdw_wztzd"
ds_wztzdcx.settrans(sqlca)
ds_wztzdcx.setsqlselect(statement)
l_wztzd=ds_wztzdcx.retrieve()
if l_wztzd>0 then 
wztzdcx=ds_wztzdcx.object.data
end if 
return l_wztzd

end function

on u_jcremote.create
call super::create
TriggerEvent( this, "constructor" )
end on

on u_jcremote.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on

event constructor;SQLCA.DBMS       =ProfileString("PB.INI","Database","DBMS",             " ")
SQLCA.Database   =ProfileString("PB.INI","Database","DataBase",         " ")
SQLCA.LogID      =ProfileString("PB.INI","Database","LogID",            " ")
SQLCA.LogPass    =ProfileString("PB.INI","Database","LogPassword",      " ")
SQLCA.ServerName =ProfileString("PB.INI","Database","ServerName",       " ")
SQLCA.UserID     =ProfileString("PB.INI","Database","UserID",           " ")
SQLCA.DBPass     =ProfileString("PB.INI","Database","DatabasePassword", " ")
SQLCA.Lock       =ProfileString("PB.INI","Database","Lock",             " ")
SQLCA.DbParm     =ProfileString("PB.INI","Database","DbParm",           " ")

connect;

end event

event destructor;disconnect;
end event

⌨️ 快捷键说明

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