📄 winit.srw
字号:
$PBExportHeader$winit.srw
forward
global type winit from window
end type
type cb_2 from commandbutton within winit
end type
type cb_1 from commandbutton within winit
end type
type dw_f from datawindow within winit
end type
end forward
global type winit from window
integer width = 2834
integer height = 1280
boolean titlebar = true
string title = "库存初始化"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_2 cb_2
cb_1 cb_1
dw_f dw_f
end type
global winit winit
on winit.create
this.cb_2=create cb_2
this.cb_1=create cb_1
this.dw_f=create dw_f
this.Control[]={this.cb_2,&
this.cb_1,&
this.dw_f}
end on
on winit.destroy
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.dw_f)
end on
event open;dw_f.settransobject( sqlca)
dw_f.insertrow(0)
end event
type cb_2 from commandbutton within winit
integer x = 1586
integer y = 860
integer width = 457
integer height = 128
integer taborder = 30
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "取消"
end type
event clicked;close(winit)
end event
type cb_1 from commandbutton within winit
integer x = 649
integer y = 856
integer width = 457
integer height = 128
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "保存"
end type
event clicked;long currow,rowcount
string drug_id1,class_id1,specs1,auth_code1,orig1
currow = dw_f.getrow()
dw_f.accepttext( )
drug_id1 = trim(dw_f.getitemstring(currow,"drug_id"))
if drug_id1 = "" or isnull(drug_id1) then
messagebox("警告","药品编号不能为空!")
dw_f.setfocus()
return
end if
rowcount = dw_f.retrieve(drug_id1)
if rowcount = 1 then
messagebox("警告","用户编码" + string(drug_id1) + "已经存在!")
dw_f.setfocus()
end if
class_id1 = trim(dw_f.getitemstring(currow,"class_id"))
if class_id1 = "" or isnull(class_id1) then
messagebox("警告","药品分类号不能为空!")
dw_f.setfocus()
return
end if
specs1 = trim(dw_f.getitemstring(currow,"specs"))
if specs1 = "" or isnull(specs1) then
messagebox("警告","药品规格不能为空!")
dw_f.setfocus()
return
end if
auth_code1 = trim(dw_f.getitemstring(currow,"auth_code"))
if auth_code1 = "" or isnull(auth_code1) then
messagebox("警告","批文号不能为空!")
dw_f.setfocus()
return
end if
orig1 = trim(dw_f.getitemstring(currow,"orig_num"))
if orig1 = "" or isnull(orig1) then
messagebox("警告","进货数量不能为空!")
dw_f.setfocus()
return
end if
//dw_i.setitem(currow,"stock_id","132")
dw_f.update()
dw_f.reset( )
dw_f.insertrow(0)
end event
type dw_f from datawindow within winit
integer x = 101
integer y = 216
integer width = 2601
integer height = 420
integer taborder = 10
string title = "none"
string dataobject = "doinittemp"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -