-- ==============================
-- 长登科技 www.ppfor.com
-- 唐镇波   2010-04-20
-- ------------------------------
-- 模块表
-- ==============================

--创建模块表
if not exists (select * from sysobjects where name='PPFOR_TZB_Model')
CREATE TABLE [PPFOR_TZB_Model] (
	[ID] int IDENTITY (1, 1) NOT NULL PRIMARY KEY,
	[modelName] varchar (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[modelUrl] varchar (200) NOT NULL ,
	[modelFile] nvarchar (20) COLLATE Chinese_PRC_CI_AS NOT NULL
)
PPFOR_GO;

---查询所有模块
if exists(select name from sysobjects where name='PPFOR_TZB_Model_GetModelList' and type='P')
	drop procedure PPFOR_TZB_Model_GetModelList
PPFOR_GO;

CREATE  PROCEDURE PPFOR_TZB_Model_GetModelList
 AS 
	SELECT [ID],modelName,modelUrl,modelFile FROM [PPFOR_TZB_Model]
PPFOR_GO;

---获取模块
if exists(select name from sysobjects where name='PPFOR_TZB_Model_GetModel' and type='P')
	drop procedure PPFOR_TZB_Model_GetModel
PPFOR_GO;

CREATE  PROCEDURE PPFOR_TZB_Model_GetModel(@ID int)
 AS 
	SELECT [ID],modelName,modelUrl,modelFile FROM [PPFOR_TZB_Model] WHERE [ID]=@ID 
PPFOR_GO;
