CREATE TABLE [AddressBook] (
[AddressBookId] [int] IDENTITY (1, 1) NOT NULL ,
[OwnerUserId] [int] NOT NULL ,
[AddressBookName] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Remark] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
CONSTRAINT [PK_AddressBook] PRIMARY KEY CLUSTERED
(
[AddressBookId]
) ON [PRIMARY] ,
CONSTRAINT [FK_AddressBook_UserInfo] FOREIGN KEY
(
[OwnerUserId]
) REFERENCES [UserInfo] (
[UserId]
)
) ON [PRIMARY]
GO
CREATE TABLE [AddressBookDetail] (
[AddressBookDetailId] [int] IDENTITY (1, 1) NOT NULL ,
[AddressBookId] [int] NOT NULL ,
[ContacterId] [int] NOT NULL ,
CONSTRAINT [PK_AddressBookDetail] PRIMARY KEY CLUSTERED
(
[AddressBookDetailId]
) ON [PRIMARY] ,
CONSTRAINT [FK_AddressBookDetail_AddressBook] FOREIGN KEY
(
[AddressBookId]
) REFERENCES [AddressBook] (
[AddressBookId]
)
) ON [PRIMARY]
GO
CREATE TABLE [InBox] (
[InBoxId] [int] IDENTITY (1, 1) NOT NULL ,
[SendUserId] [int] NOT NULL ,
[ReceiveUserId] [int] NOT NULL ,
[ReceiveTime] [datetime] NOT NULL ,
[Status] [int] NOT NULL ,
[Type] [int] NOT NULL ,
[Message] [varchar] (140) COLLATE Chinese_PRC_CI_AS NOT NULL ,
CONSTRAINT [PK_InBox] PRIMARY KEY CLUSTERED
(
[InBoxId]
) ON [PRIMARY] ,
CONSTRAINT [FK_InBox_UserInfo] FOREIGN KEY
(
[SendUserId]
) REFERENCES [UserInfo] (
[UserId]
),
CONSTRAINT [FK_InBox_UserInfo1] FOREIGN KEY
(
[SendUserId]
) REFERENCES [UserInfo] (
[UserId]
)
) ON [PRIMARY]
GO
CREATE TABLE [OutBox] (
[OutBoxId] [int] IDENTITY (1, 1) NOT NULL ,
[SendUserId] [int] NOT NULL ,
[SendTime] [datetime] NOT NULL ,
[Message] [varchar] (140) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Status] [int] NOT NULL ,
[Type] [int] NOT NULL ,
CONSTRAINT [PK_OutBox] PRIMARY KEY CLUSTERED
(
[OutBoxId]
) ON [PRIMARY] ,
CONSTRAINT [FK_OutBox_UserInfo] FOREIGN KEY
(
[SendUserId]
) REFERENCES [UserInfo] (
[UserId]
)
) ON [PRIMARY]
GO
CREATE TABLE [OutBoxDetail] (
[OutBoxDetailId] [int] IDENTITY (1, 1) NOT NULL ,
[OutBoxId] [int] NOT NULL ,
[ReceiverId] [int] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [UserInfo] (
[UserId] [int] IDENTITY (1, 1) NOT NULL ,
[LoginName] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Password] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[UserName] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Gender] [int] NOT NULL ,
[Mobile] [char] (12) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Remark] [varchar] (256) COLLATE Chinese_PRC_CI_AS NULL ,
CONSTRAINT [PK_UserInfo] PRIMARY KEY CLUSTERED
(
[UserId]
) ON [PRIMARY]
) ON [PRIMARY]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create procedure CreateInsertProcedure
@TabName varchar(128) = 'Groups'
as
declare @id as int
select @id = id
from sysobjects
where name = @TabName
declare c1 cursor for
select name,
xtype,
length,
colstat
from syscolumns
where id = @id
declare @name as varchar(128)
declare @xtype as int
declare @length as int
declare @colstat as int
declare @sp as varchar(2048)
set @sp = ' CREATE procedure [Insert' + @TabName + ']'
declare @Params as varchar(1024)
declare @Insert as varchar(1024)
declare @Values as varchar(1024)
set @Params = ''
set @Insert = ' INSERT ' + @TabName + '('
SET @Values = ' VALUES' + '('
open c1
fetch next from c1 into @name,@xtype,@length,@colstat
while @@fetch_status = 0
begin
if(@xtype = 56 and @colstat <> 1)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'int' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 35)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'text'+ ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype= 175)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'varchar' + '(' + ltrim(str(@length))+ ')' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 61)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'datetime' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 104)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'bit' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 62)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'float' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 167)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'varchar' + '(' + ltrim(str(@length))+ ')' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 60)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'money' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
else if(@xtype = 106)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'decimal' + ','
set @Insert = @Insert + @name + ',
'
set @Values = @Values + '@' + @name + ',
'
end
fetch next from c1 into @name,@xtype,@length,@colstat
end
set @Params = substring(@params, 0,len(@Params))
set @Insert = substring(@Insert, 0,len(@Insert) -5) + ')'
set @Values = substring(@Values, 0,len(@Values) -5) + ')'
set @sp = @sp + @Params + '
' + 'AS
' + @Insert + '
' +
@Values
print @sp
exec(@sp)
close c1
deallocate c1
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create procedure CreateUpdateProcedure
@TabName varchar(128) = ''
as
declare @id as int
select @id = id
from sysobjects
where name = @TabName
declare c1 cursor for
select name,
xtype,
length,
colstat
from syscolumns
where id = @id
declare @name as varchar(128)
declare @xtype as int
declare @length as int
declare @colstat as int
declare @sp as varchar(8000)
set @sp = ' CREATE procedure [Update' + @TabName + ']'
declare @Params as varchar(8000)
declare @update as varchar(8000)
declare @Values as varchar(8000)
declare @condition as varchar(1024)
set @Params = ''
set @update = ' UPDATE ' + @TabName + ''
set @Values = ' SET '
set @condition = ' WHERE 1 = 1'
open c1
fetch next from c1 into @name,@xtype,@length,@colstat
while @@fetch_status = 0
begin
if(@colstat = 1)
begin
set @Params = @Params + '
@' + convert(char(24), @name) + 'int' + ','
set @condition = @condition + '
AND ' + @name + ' = ' + '@' + convert(char(24), @name)
end
else if(@xtype = 56 and @colstat <> 1)
begin
set @Params = @Params + '
@' + convert(char(24), @name) + 'int' + ','
set @Values = @Values + @name + ' = @' + @name + ',
'
end
else if(@xtype = 35)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'text'+ ','
set @Values = @Values + @name + ' = @' + @name + ',
'
end
else if(@xtype= 175)
begin
set @Params = @Params
+ '
@' + convert(char(24), @name) + 'varchar' + '(' + ltrim(str(@length))+ ')' + ','
set @Values = @Values + @name
没有合适的资源?快使用搜索试试~ 我知道了~
短信猫程序 就与c#开发的程序
共172个文件
cs:50个
gif:21个
dll:16个
4星 · 超过85%的资源 需积分: 3 132 下载量 123 浏览量
2009-01-04
13:23:57
上传
评论
收藏 1.34MB RAR 举报
温馨提示
一个基于c#开发的短信猫程序 希望大家喜欢 互相学习 共同进步 谢谢您的支持!
资源详情
资源评论
资源推荐
收起资源包目录
短信猫程序 就与c#开发的程序 (172个子文件)
Global.asax 112B
Global.asax 70B
Left.ascx 2KB
top.ascx 1KB
SendedMail.aspx 11KB
UnReadMessage.aspx 10KB
GetMessage.aspx 10KB
QueryAddressBook.aspx 7KB
NewMail.aspx 7KB
CreateAddressBook.aspx 6KB
CreateUser.aspx 5KB
Message.aspx 3KB
Login.aspx 2KB
LoginErr.aspx 1KB
WebForm1.aspx 643B
WebForm1.aspx 112B
doctodep.btr 324B
deptodoc.btr 324B
service.cnf 1KB
access.cnf 113B
services.cnf 3B
Web.config 4KB
Web.config 112B
AddressBook.cs 30KB
AddressBook.cs 30KB
OutBox.cs 29KB
OutBox.cs 29KB
InBoxData.cs 19KB
InBoxData.cs 19KB
UserInfo.cs 18KB
UserInfo.cs 18KB
DataBaseOperate.cs 7KB
DataBaseOperate.cs 7KB
GetMessage.aspx.cs 5KB
UnReadMessage.aspx.cs 5KB
QueryAddressBook.aspx.cs 4KB
NewMail.aspx.cs 4KB
SendedMail.aspx.cs 4KB
OutBoxes.cs 3KB
OutBoxes.cs 3KB
AddressBooks.cs 3KB
AddressBooks.cs 3KB
CreateAddressBook.aspx.cs 3KB
CreateUser.aspx.cs 2KB
UserInfos.cs 2KB
UserInfos.cs 2KB
InBoxes.cs 2KB
InBoxes.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AddressBookSystem.cs 2KB
AddressBookSystem.cs 2KB
InBoxSystem.cs 2KB
InBoxSystem.cs 2KB
Login.aspx.cs 2KB
OutBoxSystem.cs 2KB
OutBoxSystem.cs 2KB
UserInfoSystem.cs 2KB
UserInfoSystem.cs 2KB
Message.aspx.cs 1KB
top.ascx.cs 1KB
Global.asax.cs 1KB
Left.ascx.cs 1KB
LoginErr.aspx.cs 1KB
WebForm1.aspx.cs 963B
QueryStruct.cs 393B
QueryStruct.cs 393B
PageBase.cs 312B
AssemblyInfo.cs 112B
WebForm1.aspx.cs 112B
PageBase.cs 112B
Global.asax.cs 112B
ESM.csproj 18KB
Lib.csproj 9KB
Lib.csproj 8KB
ESM.csproj 112B
css.css 432B
microsoft.web.ui.webcontrols.dll 182KB
Lib.dll 68KB
Lib.dll 68KB
Lib.dll 68KB
Lib.dll 68KB
Lib.dll 68KB
ESMWEB.dll 44KB
Entity.OutBox.cs.dll 28KB
Entity.OutBox.cs.dll 28KB
EMS.dll 20KB
Entity.AddressBook.cs.dll 19KB
Entity.AddressBook.cs.dll 19KB
Entity.InBoxData.cs.dll 14KB
Entity.InBoxData.cs.dll 14KB
Entity.UserInfo.cs.dll 13KB
Entity.UserInfo.cs.dll 13KB
logo.gif 4KB
tab.slide.hm.li.gif 3KB
toolbar.gif 2KB
nv_bgpattern.gif 1KB
plus.gif 882B
minus.gif 879B
共 172 条
- 1
- 2
yhzaspnet
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Python实现的自动化办公项目.zip
- 基于python实现的基于PyQt5和爬虫的小说阅读系统.zip
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论3