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

📄 dw_stock.srw

📁 用pb(power builder)制作的医院管理系统 附有数据库脚本
💻 SRW
字号:
$PBExportHeader$dw_stock.srw
forward
global type dw_stock from window
end type
type dw_g from datawindow within dw_stock
end type
type cb_2 from commandbutton within dw_stock
end type
type cb_1 from commandbutton within dw_stock
end type
type dw_s from datawindow within dw_stock
end type
end forward

global type dw_stock from window
integer width = 2779
integer height = 1480
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
dw_g dw_g
cb_2 cb_2
cb_1 cb_1
dw_s dw_s
end type
global dw_stock dw_stock

on dw_stock.create
this.dw_g=create dw_g
this.cb_2=create cb_2
this.cb_1=create cb_1
this.dw_s=create dw_s
this.Control[]={this.dw_g,&
this.cb_2,&
this.cb_1,&
this.dw_s}
end on

on dw_stock.destroy
destroy(this.dw_g)
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.dw_s)
end on

event open;dw_s.settransobject(sqlca)
dw_s.insertrow(0)

dw_g.settransobject(sqlca)
dw_g.insertrow(0)
end event

type dw_g from datawindow within dw_stock
integer x = 151
integer y = 608
integer width = 2459
integer height = 440
integer taborder = 20
string title = "none"
string dataobject = "stockmian"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

type cb_2 from commandbutton within dw_stock
integer x = 1577
integer y = 1112
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(dw_stock)
end event

type cb_1 from commandbutton within dw_stock
integer x = 370
integer y = 1104
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
string stock_id1, drug_id1,class_id1,specs1,auth_code1,in_num1

currow  = dw_s.getrow()
dw_s.accepttext( )

stock_id1 = trim(dw_s.getitemstring(currow,"stock_id"))

if stock_id1 = "" or isnull(stock_id1) then
	messagebox("警告","进货号不能为空!")
	dw_stock.setfocus()
	return
end if



drug_id1 = trim(dw_s.getitemstring(currow,"drug_id"))

if drug_id1 = "" or isnull(drug_id1) then
	messagebox("警告","药品编号不能为空!")
	dw_s.setfocus()
	return
end if


class_id1 = trim(dw_s.getitemstring(currow,"class_id"))

if class_id1 = "" or isnull(class_id1) then
	messagebox("警告","药品分类号不能为空!")
	dw_s.setfocus()
	return
end if


specs1 = trim(dw_s.getitemstring(currow,"specs"))

if specs1 = "" or isnull(specs1) then
	messagebox("警告","药品规格不能为空!")
	dw_s.setfocus()
	return
end if


auth_code1 = trim(dw_s.getitemstring(currow,"auth_code"))

if auth_code1 = "" or isnull(auth_code1) then
	messagebox("警告","批文号不能为空!")
	dw_s.setfocus()
	return
end if


in_num1 = trim(dw_s.getitemstring(currow,"in_num"))

if in_num1 = "" or isnull(in_num1) then
	messagebox("警告","进货数量不能为空!")
	dw_s.setfocus()
	return
end if




////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////



long currow2
string stock_id2, stock_date1,buyer1,check_ok1,warehouse_ok1,vend_id1

currow2  = dw_g.getrow()
dw_g.accepttext( )

stock_id2 = trim(dw_g.getitemstring(currow2,"stock_id"))

if stock_id2 = "" or isnull(stock_id2) then
	messagebox("警告","进货号不能为空!")
	dw_g.setfocus()
	return
end if



stock_date1 = trim(dw_g.getitemstring(currow2,"stock_date"))

if stock_date1 = "" or isnull(stock_date1) then
	messagebox("警告","进货日期不能为空!")
	dw_g.setfocus()
	return
end if


buyer1 = trim(dw_g.getitemstring(currow2,"buyer"))

if buyer1 = "" or isnull(buyer1) then
	messagebox("警告","采购员不能为空!")
	dw_g.setfocus()
	return
end if


check_ok1 = trim(dw_g.getitemstring(currow2,"check_ok"))

if check_ok1 = "" or isnull(check_ok1) then
	messagebox("警告","质检员确认不能为空!")
	dw_s.setfocus()
	return
end if


warehouse_ok1 = trim(dw_g.getitemstring(currow2,"warehouse_ok"))

if warehouse_ok1 = "" or isnull(warehouse_ok1) then
	messagebox("警告","仓管员确认不能为空!")
	dw_g.setfocus()
	return
end if


vend_id1 = trim(dw_g.getitemstring(currow2,"vend_id"))

if vend_id1 = "" or isnull(vend_id1) then
	messagebox("警告","仓库号不能为空!")
	dw_g.setfocus()
	return
end if

dw_s.update()
dw_s.reset( )
dw_s.insertrow(0)

dw_g.update()
dw_g.reset( )
dw_g.insertrow(0)
end event

type dw_s from datawindow within dw_stock
integer x = 128
integer y = 48
integer width = 2473
integer height = 460
integer taborder = 10
string title = "none"
string dataobject = "dostock"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

⌨️ 快捷键说明

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