免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
ASP.net:仿QQ短信(QQ郵箱里面的功能)
ASP.net:仿QQ短信(QQ郵箱里面的功能)
專題圖
編號:ylbtechOpenSource
1,功能描述
仿QQ短信(QQ郵箱里面的功能),登錄,短息主界面,發(fā)信息,單個話題對話。
2,技術與環(huán)境
操作系統(tǒng):
windows
開發(fā)語言:
C#
開發(fā)框架:
數(shù)據(jù)庫:
SQLServer
開發(fā)軟件:
Microsoft Visual Studio 2010
開發(fā)技術:
ASP.net
項目組長:
yuanbo
成員:
null
個人主頁:
http://www.cnblogs.com/ylbtech/
科研團隊:
ylbtech
教研團隊:
ylbtech
3,數(shù)據(jù)庫設計
-- =============================================-- ylb;仿QQ短信-- development time:11:35 2012-04-18-- =============================================use mastergoIF EXISTS (SELECT *FROM master..sysdatabasesWHERE name = N'QQMessage')DROP DATABASE QQMessageGOCREATE DATABASE QQMessageGOuse QQMessagego-- =============================================-- ylb;1,Users-- remark:用戶表-- =============================================create table Users(userId int primary key identity(100,1), --編號[PK]nickname varchar(200) not null, --昵稱userpass varchar(200) not null, --密碼headImage varchar(200), --頭像地址username varchar(200), --備注姓名flag int default(0) check(flag in(0,1)) --標識,flag=1,說明此用戶已注銷,0:正常)go-- =============================================-- ylb;2,Note-- remark:短信表-- =============================================create table Message(msgId int primary key identity(200,1), --編號[PK]toUserId varchar(200) not null, --收信人編號[FK]content varchar(500) not null, --發(fā)新內容pubdate datetime default(getdate()), --發(fā)送時間sendUserId int --發(fā)送用戶編號[FK])-- =============================================-- ylb;3,Friend-- remark:好友表-- =============================================create table Friend(userId int not null, --用戶編號friendId int not null --用戶好友編號)print '數(shù)據(jù)創(chuàng)建成功!'-- =============================================-- ylb;仿QQ短信-- development time:11:35 2012-04-18-- =============================================use QQMessagego--InsertDatainsert into Users(nickname,userpass,headImage) values('sunshine','m123','default.jpg')insert into Users(nickname,userpass,headImage) values('rain','m123','default.jpg')insert into Users(nickname,userpass,headImage) values('lanchong','m123','default.jpg')insert into Users(nickname,userpass,headImage) values('sun','m123','default.jpg')select * from Usersgo--修改備注update Users set username='袁博' where userId=102go--登錄select count(*) from Users where userId=100 and userpass='m123'go--刪除一組會話delete Message where toUserId=100 and sendUserId=101 or toUserId=101 and sendUserId=100go--1,發(fā)送信息--1,outBoxinsert into Message(toUserId,content,sendUserId) values(100,'I is sunshie',101)--2,inBoxinsert into Message(toUserId,content,sendUserId) values(101,'Who are you?',100)insert into Message(toUserId,content,sendUserId) values(100,'sunshie',101)go--2,我的收信列表--2_1,Listselect userId,nickname,headImage,username from Userswhere userId in(select sendUserId from Message where toUserId=100)or userId in(select toUserId from Message where sendUserId=100)go--2_2,附屬最近的一條短信select top 1 msgId,toUserId,content,pubdate,sendUserId from Messagewhere toUserId=100 and sendUserId=101 or toUserId=101 and sendUserId=100order by msgId desc--最新的回復select top 1 content from Message where toUserId=101 and sendUserId=100order by msgId descgoselect userId,nickname,headImage,username from Userswhere userId in(select sendUserId from Message where toUserId=100)select userId,nickname,headImage,username,content from Users u left join Message mon u.userId=m.toUserIdgo--3,單機看詳細select * from Usersselect * from Messagego--3_1,獲取備注select nickname from Users where userId=1go--3_2,獲取列表select * from Users u left join Message mon u.userId=m.toUserIdgo--結論select userId,nickname,headImage,username,msgId,content,pubdate,sendUserId from Users uleft join Message m on u.userId=m.toUserIdwhere toUserId=100 and sendUserId=101 or toUserId=101 and sendUserId=100
4,功能截圖
4.1,前臺
4.1.1  /SignIn.aspx
4.1.2  /Menu.aspx  短息主界面
4.1.3  /Write.aspx  寫短消息
4.1.4  /Detail.aspx  單個對話組
5,代碼分析
解決方案屬性圖
5.1,前臺
5.1.1  /Handler/SendMsg.ashx
<%@ WebHandler Language="C#" Class="SendMsg" %>using System;using System.Web;public class SendMsg : IHttpHandler {public void ProcessRequest (HttpContext context) {context.Response.ContentType = "text/plain";//發(fā)送短信int toUserId = Convert.ToInt32(context.Request["toUserId"]);int sendUserId = Convert.ToInt32(context.Request["sendUserId"]);MessageInfo dal = new MessageInfo(){ToUserId = toUserId,SendUserId = sendUserId,Content = context.Server.UrlDecode(context.Request["content"])};//Call Funint id= MessageOper.Add(dal);context.Response.Write(id+"");}public bool IsReusable {get {return false;}}}
5.2,后臺
6,示例|講解案例下載
博客園講解:  http://ylbtech.cnblogs.com/
百度文庫開發(fā)文檔: http://passport.baidu.com/?business&aid=6&un=ylbtech#7
谷歌開源代碼下載:http://code.google.com/p/ylbtechopensource/downloads/list 請單擊“ver1.1 QQMessage”
本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
linux shell編程之文件內容寫入和日志記錄
在ASP.NET中實現(xiàn)AJAX
ASP.NET- Cookie操作詳解(寫入、讀取、修改、刪除)
[ASP.net教程]定制Asp.NET 5 MVC內建身份驗證機制
ASP.NET Core+Element+SQL Server開發(fā)校園圖書管理系統(tǒng)(二)
lw080808的日志
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服