思路整理,无非就是点一个按钮,然后一个图片旋转一会就出来个结果就行了,可这个程序的要求不是这样的,是需要从数据库中随机抽取用户,根据数据库中指定的等级和人数,一键全部抽出来结果就行了。同时需要存储到数据库。还需要一个导出的功能。
CREATE TABLE [dbo].[users](
[id] [int] IDENTITY(1,1) NOT NULL,
[name] [nvarchar](50) NOT NULL,
[phone] [nvarchar](50) NULL,
CONSTRAINT [PK_table1] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[result](
[id] [int] IDENTITY(1,1) NOT NULL,
[usersid] [int] NOT NULL,
[awardsid] [int] NOT NULL,
CONSTRAINT [PK_result] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[awards](
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50)
var cpro_id = "u6885494";