且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ylbtech_dbs_yestem(伊思腾)

更新时间:2022-09-19 09:52:10

专题图ylbtech_dbs_yestem(伊思腾)编号:ylbtechASPNET

1,功能描述

   仿易思腾企业门户,这个网站做的非常经典,设计难度之大。开发时间长达半年之久,终将它完美实现。该博文以“首页”,“关于我们”和“站点地图”为路线介绍,实现过程和思路。

2,技术与环境

 ASP.net+SQLServer

3,数据库设计
数据库关系图

ylbtech_dbs_yestem(伊思腾)

3.1,/App_Data/sql-basic.sql  数据库设计
ylbtech_dbs_yestem(伊思腾)
use master
-- =============================================
-- ylb:易思腾数据库设计
-- databaseName:yestem
-- author:YUANBO
-- url:www.yestem.com
-- development time:2010-1-12
-- =============================================
IF EXISTS (SELECT * 
       FROM   master..sysdatabases 
       WHERE  name = N'yestem')
    DROP DATABASE yestem
GO

CREATE DATABASE yestem
GO
USE yestem
GO
-- =============================================
-- ylb:1, 创建一级分类表
-- =============================================
create table category (
categoryid int primary key IDENTITY(1, 1),     --分类ID
categoryname varchar(100) NOT NULL,    --分类名称
categoryfullname varchar(100) NULL,    --分类全称
categorydesc ntext NULL,        --备注
categoryurl varchar(100) NULL,        --空间名称
imageurl varchar(100) NULL,        --图片地址
showmode varchar(100) NULL,        --显示模式
categoryflag int default(0) NULL)    --标记flag=0时显示菜单
GO
--select * from category
--insert category(categoryname,categoryfullname,categoryurl,categorydesc,imageurl,showmode) 
--values('','','','','','')

go
-- =============================================
-- ylb:2, 创建二级分类表
-- =============================================
create table type (
typeid int primary key IDENTITY(1, 1),     --分类ID
typename varchar(100) NOT NULL,        --分类名称
typefullname varchar(100) NULL,        --分类全称
typedesc ntext NULL,            --备注
typeurl varchar(100) NULL,        --空间名称
imageurl varchar(100) NULL,        --图片地址
showmode varchar(100) NULL,        --显示模式
typeflag int default(0) NULL,        --标记flag=0时显示菜单
categoryid int foreign key references category(categoryid) --Category表的外键
)
--drop table type
--select * from category
--select * from type
--insert type(typename,typefullname,typedesc,typeurl,imageurl,showmode,categoryid) values('','','','','','',)
--insert into type

GO
-- =============================================
-- ylb:3, 创建文章类别表
-- =============================================
create table articletype (
articletypeid int primary key IDENTITY(1, 1),     --分类ID
articletypename varchar(100) NOT NULL,        --分类名称
articletypefullname varchar(100) NULL,        --分类全称
articletypedesc ntext NULL,            --备注
articletypeurl varchar(100) NULL,        --空间名称
articletypeflag int default(0) NULL,        --标记flag=0时显示菜单
typeid int foreign key references type(typeid) --type表的外键
)
GO
--select * from articletype
--select * from type where typename=''
--insert articletype(articletypename,articletypefullname,articletypedesc,articletypeurl,typeid) values('','','','',)

go
-- =============================================
-- ylb:4, 创建文章表
-- =============================================
create table article(
articleid int primary key IDENTITY(1, 1),     --文章ID
articlename varchar(100) NOT NULL,        --名称
--articlefullname varchar(100) NULL,        --全称
content ntext NUll,                --内容
--articledesc ntext NULL,                --备注
articleurl varchar(100) NULL,            --空间名称
articleupdate datetime default(getdate()),    --发布时间
articleflag int default(0) NULL,        --标记flag=0时显示菜单
typeid int foreign key references type(typeid), --type表的外键
articletypeid int NULL                 --articletype表的articleid
)
GO
--drop table article
--select * from article
--select * from type where typename='公司新闻'
--select * from articletype where articletypename=''
--insert article(articlename,content,articleurl,articleupdate,typeid,articletypeid) values('','',
--'','',,)

go
-- =============================================
-- ylb:5, 创建案例表(客户案例)
-- =============================================
create table [case] (
caseid int primary key IDENTITY(1, 1),     --案例id
casename varchar(100) NOT NULL,        --案例名称
caseimage varchar(100) NULL,        --图片
casebigimage varchar(100) NULL,        --大图片
caseupdate datetime default(getdate()),    --发布时间
caseurl varchar(100) NULL,        --空间名称
caseflag int default(0) NULL,    --标记flag=0时显示菜单
typeid int foreign key references type(typeid), --type表的外键
articletypeid int NULL     
)
GO
--drop table [case]
--select * from [case]
--insert [case](casename,caseimage,casebigimage,caseupdate,caseurl,typeid,articletypeid) values('','','',default,'',,)
--select * from type where typename='知名客户'
--select * from articletype where articletypename='WebPlu***品体系'

go
-- =============================================
-- ylb:6, 创建招聘表(招贤纳士)
-- =============================================
create table job (
jobid int primary key IDENTITY(1, 1),     --职位id
jobname varchar(100) NOT NULL,        --职位名称
jobfullname varchar(100) NULL,        --职位全称
workplace varchar(100) NULL,        --工作地点
acount int NULL,            --招聘人数
contactway varchar(100) NULL,        --联系方式
mainduty ntext NUll,                --工作职责
mainrequest ntext NULL,                --任职要求
joburl varchar(100) NULL,            --空间名称
jobflag int default(0) NULL,        --标记flag=0时显示菜单
articlename varchar(100) NOT NULL,    --招聘部门(即文章类别分类名称)
typeid int foreign key references type(typeid), --type表的外键
articletypeid int NULL     
)
GO
print '创建yestem数据库成功!'
ylbtech_dbs_yestem(伊思腾)

 

3.2,/App_Data/Insert/  插入测试数据  【注:插入略】
3.2.1,/App_Data/Insert/1,category.sql
3.2.2,/App_Data/Insert/2.type.sql
3.2,.3/App_Data/Insert/3.articletype.sql
3.2.4,/App_Data/Insert/4.article.sql
3.2.5,/App_Data/Insert/5.case.sql
3.2.6,/App_Data/Insert/6.job.sql
3.3,/App_Data/update-yestem.sql  后期修改
ylbtech_dbs_yestem(伊思腾)
use yestem

go
--- 后期修改
update articletype set typeid=10 where articletypeid=6
print '数据库创建完成!'
select * from category

select categoryid,categoryname,categoryurl from category
ylbtech_dbs_yestem(伊思腾)

 3.4,/App_Data/Dec 30,2010nyestem_bd.sql  【注:一次性脚本】

 
4,功能截图
4.1,/Web/Index.aspx

ylbtech_dbs_yestem(伊思腾)


4.2,/Web/templates/T_yestem_News/Index.aspx?cateid=1

ylbtech_dbs_yestem(伊思腾)


4.3,/Web/templates/T_yestem_News/Index.aspx?page=1&cateid=1&typeid=1&pagemode=

ylbtech_dbs_yestem(伊思腾)


4.4,/Web/templates/T_yestem_News/Index.aspx?page=1&cateid=1&typeid=4&pagemode=Index_Page_005

ylbtech_dbs_yestem(伊思腾)


4.5,/Web/templates/T_yestem_News/Index.aspx?cateid=1&typeid=4&articleid=12

ylbtech_dbs_yestem(伊思腾)


4.6,/Web/site_map.aspx?cateid=8

ylbtech_dbs_yestem(伊思腾)

5,代码分析

 解决方案属性图

ylbtech_dbs_yestem(伊思腾)

ylbtech_dbs_yestem(伊思腾)

 

 
6,示例|讲解案例下载

博客园讲解:  http://ylbtech.cnblogs.com/

百度文库开发文档: http://passport.baidu.com/?business&aid=6&un=ylbtech#7

谷歌开源代码下载: http://code.google.com/p/ylbtechopensource/downloads/list

请单击“Yestem”


本文转自ylbtech博客园博客,原文链接:http://www.cnblogs.com/ylbtech/archive/2012/09/13/2682733.html,如需转载请自行联系原作者