ktv点歌系统设计报告(参考)---副本.doc

上传人:scccc 文档编号:11424409 上传时间:2021-08-04 格式:DOC 页数:22 大小:365KB
返回 下载 相关 举报
ktv点歌系统设计报告(参考)---副本.doc_第1页
第1页 / 共22页
ktv点歌系统设计报告(参考)---副本.doc_第2页
第2页 / 共22页
ktv点歌系统设计报告(参考)---副本.doc_第3页
第3页 / 共22页
ktv点歌系统设计报告(参考)---副本.doc_第4页
第4页 / 共22页
ktv点歌系统设计报告(参考)---副本.doc_第5页
第5页 / 共22页
点击查看更多>>
资源描述

《ktv点歌系统设计报告(参考)---副本.doc》由会员分享,可在线阅读,更多相关《ktv点歌系统设计报告(参考)---副本.doc(22页珍藏版)》请在三一文库上搜索。

1、C#课程设计(报告)KTV点歌系统论文作者:指导教师:专 业:软件技术系 (院):信息工程系答辩日期:2015年 1 月 21 日摘 要娱乐是人的一生中不可或缺的部分。随着现如今经济文化水平的显著提高,人们对生活质量及工作环境的要求也越来越高。同事,随着生活节奏的加快,每个人都处于忙碌繁乱的社会的那个当中,不论是在家庭,工作场所,或是学校中,无时无刻充满着生活和学习上的压力。工作之余,找到一种能够换季压力,释放疲劳的娱乐方式,已成为大家共同的愿望。因此娱乐业在服务行业中占有越来越重要的地位。然而,受到工作条件和时间的限制,越来越多的人们选择了去唱唱歌,跳跳舞或者在自己家中自娱自乐点歌系统也因此

2、有了广阔的发展前景。 本系统是利用c#语言作为开发语言,Visual Studio 2008作为开发工具,并结合Sql Server 2008作为后台数据库,对点歌系统进行开发。目 录摘 要2第1章 绪论11.1 开发背景11.2开发工具选用介绍11.3 研究目的、意义和范围2第2章 设计背景42.1 需求分析52.1.1 系统的目标52.1.2功能结构5第3章 KTV点歌系统设计73.1KTV点歌系统结构功能73.2数据库的分析与设计8第4章 主要界面及功能的实现104.1后台管理登录界面及实现104.2 实现新闻管理功能模块104.2.1 管理员登录界面104.2.2 添加新闻界面114.

3、2.3新闻管理界面124.2.4 分类管理界面124.3网站前台实现13第5章 系统部分重要功能及其代码145.1 web用户控件145.2 通用类代码145.2.1数据库连接操作代码145.2.2数据绑定的部分代码145.3新闻的管理155.3.1添加新闻的部分代码155.4用户登录的代码16第6章 结论18致 谢19参考文献20第1章 绪论第1章 绪论1.1 开发背景目前,卡拉OK歌厅遍及中国的大江南北,人们总是在闲暇时刻去潇洒一回。而传统歌厅的设施正在逐渐老化,由于ld机器的停产和片源全部依赖进口,成本很高,造成用户经济上的负担过重,而且新歌很少,点歌方式原始,速度慢这样就给人们的休闲、

4、情绪蒙上了一层阴影。随着科技的发展和信息时代的到来利用高新技术来实现卡拉ok娱乐城设备的革命性建设是完全可能的,而且可以满足与消费者的多种需求。1.2开发工具选用介绍利用c#语言作为开发语言,Visual Studio 2008作为开发工具用来实现各个窗体模块的功能,并结合Sql Server 2008作为后台数据库管理后台数据。1.3 研究目的、意义和范围 随着PC机性能不不断提高,多媒体应用也来越多地地出现在用户的应用系统中。最初这些应用都是单机运行的,而且多是以光盘作为载体播放视频和音频信息。近几年来,醉着网络技术的不断发展,多媒体应用逐渐由单机模式走向网络模式。视频播放主要采用了网络数

5、字化流机制技术,及视频点播,并以其快速、灵活、有效的特点,得到了各领域用户的广泛青睐没越来越成为juyoushiy6ongjiazhide时尚潮流。作为一项新兴应用技术,视频点播技术与也来越多的应用于政府、。学校、智能小区、ktv而提高设备档次,对于ktv来说显得尤为重要。第3章 新闻发布系统设计第2章 设计背景现今的社会,人们对生活质量及工作环境的要求也越来越高。同事,随着生活节奏的加快,每个人都处于忙碌繁乱的社会的那个当中,不论是在家庭,工作场所,或是学校中,无时无刻充满着生活和学习上的压力。工作之余,找到一种能够换季压力,释放疲劳的娱乐方式,已成为大家共同的愿望。Ktv是现今社会人们中哟

6、啊的娱乐方式之一。2.1 系统目标通过实际调查,ktv点歌系统赢主要实现以下目标。系统采用人机交互的方式,界面没关友好,信息查询灵活歌星点歌,根据演唱歌星的名字来查询并选择歌曲。数字点歌,根据歌曲编号查询并选择。拼音点歌,根据歌名首字母来点歌。歌名点歌,根据歌名检索歌曲。系统最大限度的实现易维护性和易操作性。Ktv点歌系统2.2 系统结构 后台数据维护系统点歌用户管理歌曲信息管理歌曲类型信息管理明星信息管理播放歌曲选择歌曲歌名点歌拼音点歌明星点歌数字点歌第3章 ktv点歌系统设计3.2数据库的分析与设计一个成功的系统,是建立在许多条件之上的,而数据库是其中一个非常重要的条件和关键技术。(1)数

7、据库需求分析的任务是将业务管理单证流化为数据流,划分主题之间的边界,绘制出DFD图,并完成相应的数据字典。(2)概念设计的任务是从DFD出发,绘制出该主题的实体关系图,并列出各个实体与关系的纲要表。(3)逻辑设计的任务是从E-R图与对应的纲要表出发,确定各个实体及关系的表名属性。(4) 物理设计的任务是确定所有属性的类型、宽度与取值范围,设计出基本表的主键,将所有的表名与字段名英文化,实现物理建库,完成数据库物理设计字典。(5)加载测试工作贯穿于程序测试工作的全过程,整个录入、修改、查询、删除、处理工作均可视为对数据库的加载测试工作。根据系统功能设计的要求以及功能模块的划分,数据库需要的存储的

8、信息如下:1.管理员信息:编号、登录名、密码、E-Mail。2.新闻ID、新闻标题、新闻内容、是否有图片、时间、出处。该系统使用SQL Server 2008作为应用程序的数据,而根据数据库中所需要存储的信息,共建立了有4张数据表。以下是五个表的结构:tb_computer表如表3-1所示:表3-1 tb_computer表tb_authorinfo表如表3-2所示:tb_authorinfo表tb_dictionarye表如表3-3所示:tb_dictionarye表tb_musicinfo表如表3-4所示:tb_musicinfo表第5章 系统部分重要功能及其代码第4章 主要界面及功能的实

9、现4.1登录界面及实现(1)用户登录设计:在本页面只有输入正确的用户名、密码及验证码才可登录。后台管理登录界面,只有通过本页面输入正确的用户名及密码才能进入后台管理系统。界面如图4-1所示:图4-1登录系统界面4.2.1 管理员登录界面用户输入的数据通过与数据库中的数据核对正确后,且验证码正确后才可显示管理员登录页面中的信息。并且在该页就可以对内容信息进行修改和删除。管理员登录界面如图4-2所示:图4-2管理员登录界面4.2.3点歌界面图4-4编辑新闻界面第5章 系统部分重要功能及其代码5.2 通用类代码5.2.1数据库连接操作代码在ASP.NET中通过ADO.NET技术对数据库进行操作。AD

10、O.NET中有许多很方便的类可用来操作数据库,例如创建数据库连接namespace KTV.KTVclass class getConnection public SqlConnection OledCon() /创建连接数据库的字符串 string strConn = Data Source=.;Initial Catalog=db_KTV;Integrated Security=True; /string strConn = Data Source=PC201405130659SQLEXPRESS;Initial Catalog=db_KTV;User ID=roots;password=

11、123321; SqlConnection s = new SqlConnection(strConn); return s; /end if 自定义方法 public class tbMusicnfoMenthod SqlCommand oledcmd = null; SqlConnection oledCon = null; SqlDataReader oleRed = null; #region 添加 public int tbMusicnfoAdd(tb_musicinfo tb_aut) int intResult = 0; try getConnection getCon = ne

12、w getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); string strAdd = insert into tb_musicinfo values ( ; strAdd += + tb_aut.strMusic_code + , + tb_aut.strMusicC_name + ,; strAdd += + tb_aut.strMusic_author + , + tb_aut.strMusic_Kind + ,; strAdd += + tb_aut.strMusic_chinse + , + tb_aut.strM

13、usic_filepath + ,; strAdd += + tb_aut.strMusic_Ping + , + tb_aut.daMusic_date + ,; strAdd+=+ tb_aut.intMusic_falg+); oledcmd = new SqlCommand(strAdd, oledCon); intResult = oledcmd.ExecuteNonQuery(); return intResult; catch (Exception ee) MessageBox.Show(ee.Message.ToString(); return intResult; #endr

14、egion #region 修改 public int tbMusicnfoUpdate(tb_musicinfo tb_aut) int intResult = 0; try getConnection getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); string strAdd = update tb_musicinfo set ; strAdd += Music_name= + tb_aut.strMusicC_name + ,; strAdd += Music_auth= + tb_aut

15、.strMusic_author + ,Music_Kind= + tb_aut.strMusic_Kind + ,; strAdd += Music_chinse= + tb_aut.strMusic_chinse + ,Music_filpath= + tb_aut.strMusic_filepath + ,; strAdd += Music_Ping= + tb_aut.strMusic_Ping + ,Music_date= + tb_aut.daMusic_date + ,; strAdd += Music_falg = + tb_aut.intMusic_falg + where

16、Music_code= + tb_aut.strMusic_code + ; oledcmd = new SqlCommand(strAdd, oledCon); intResult = oledcmd.ExecuteNonQuery(); return intResult; catch (Exception ee) MessageBox.Show(ee.Message.ToString(); return intResult; #endregion #region 删除 public int tbMusicnfoDelete(string tb_aut) int intResult = 0;

17、 try getConnection getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); string strAdd = delete * from tb_musicinfo where ; strAdd += Music_code= + tb_aut+ ; oledcmd = new SqlCommand(strAdd, oledCon); intResult = oledcmd.ExecuteNonQuery(); return intResult; catch (Exception ee) M

18、essageBox.Show(ee.Message.ToString(); return intResult; #endregion #region 编号 public int tbMusicnfoID() int intResult = 0; try getConnection getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); string strAdd = select Max(Music_code) from tb_musicinfo; oledcmd = new SqlCommand(st

19、rAdd, oledCon); oleRed = oledcmd.ExecuteReader(); oleRed.Read(); if (oleRed.HasRows) if (oleRed0.ToString() = ) intResult = 1; else intResult = Convert.ToInt32(oleRed0.ToString() + 1; return intResult; catch (Exception ee) MessageBox.Show(ee.Message.ToString(); return intResult; #endregion #region 查

20、询 public void tbMusicnfoFill(object obj) try getConnection getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); string strAdd = select * from tb_musicinfo ; oledcmd = new SqlCommand(strAdd, oledCon); oleRed = oledcmd.ExecuteReader(); ListView lv = (ListView)obj; lv.Items.Clear()

21、; while (oleRed.Read() ListViewItem lv1 = new ListViewItem(oleRed0.ToString(); lv1.SubItems.Add(oleRed1.ToString(); lv1.SubItems.Add(oleRed2.ToString(); lv1.SubItems.Add(oleRed3.ToString(); lv1.SubItems.Add(oleRed4.ToString(); lv1.SubItems.Add(oleRed5.ToString(); lv.Items.Add(lv1); oleRed.Close(); c

22、atch (Exception ee) MessageBox.Show(ee.Message.ToString(); #endregion #region 查询 public SqlDataReader tbMusicnfoFillReder(string obj) try getConnection getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); string strAdd = select * from tb_musicinfo where Music_code=+obj+; oledcmd

23、 = new SqlCommand(strAdd, oledCon); oleRed = oledcmd.ExecuteReader(); return oleRed; catch (Exception ee) MessageBox.Show(ee.Message.ToString(); return oleRed; #endregion #region 查询 public int tbFill( object obj,string strResult,int intFalg) int intResult = 0; try string strSelect = null; getConnect

24、ion getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); switch (intFalg) case 1:/数字 strSelect = select * from tb_musicinfo where Music_code like % + strResult + %; break; case 2:/拼音 strSelect = select * from tb_musicinfo where Music_Ping like % + strResult + %; break; case 3:/明

25、星 strSelect = select * from tb_musicinfo where Music_auth like % + strResult + %; break; case 4:/明名 strSelect = select * from tb_musicinfo where Music_name like % + strResult + %; break; oledcmd = new SqlCommand(strSelect, oledCon); oleRed = oledcmd.ExecuteReader(); ListView lv = (ListView)obj; lv.I

26、tems.Clear(); while (oleRed.Read() ListViewItem lv1 = new ListViewItem(oleRed0.ToString(); lv1.SubItems.Add(oleRed1.ToString(); lv1.SubItems.Add(oleRed2.ToString(); lv1.SubItems.Add(oleRed3.ToString(); lv.Items.Add(lv1); intResult+; oleRed.Close(); return intResult; catch (Exception ee) MessageBox.S

27、how(ee.Message.ToString(); return intResult; #endregion #region 查询 public string tbFillName(string strResult) string Result = null; try string strSelect = null; getConnection getCon = new getConnection(); oledCon = getCon.OledCon(); oledCon.Open(); strSelect = select Music_filpath from tb_musicinfo

28、where Music_code= + strResult + ; oledcmd = new SqlCommand(strSelect, oledCon); oleRed = oledcmd.ExecuteReader(); oleRed.Read(); if(oleRed.HasRows) Result = oleRed0.ToString(); oleRed.Close(); return Result; catch (Exception ee) MessageBox.Show(ee.Message.ToString(); return Result; #endregion 5.4用户登

29、录的代码该项系统只有拥有了用户名及密码才能够登录进行该系统,登录页面里登录按钮的单击事件处理程序如下: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using KTV.KTVclass;namespace KTV public partial class frmLogin : Form public frmLogin() In

30、itializeComponent(); private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) private void bntOK_Click(object sender, EventArgs e) tb_computer computer = new tb_computer(); if(txtUser.Text=) MessageBox.Show(登录名称不能为空!); txtUser.Focus(); return; if(txtPwd.Text=) MessageBox.Show(登录密码不能为空

31、!); txtPwd.Focus(); return; if(cmbLogin.Text=) MessageBox.Show(请选择登录界面); cmbLogin.Focus(); return; computer.strcmp_name=txtUser.Text; computer.strcmp_Paww=txtPwd.Text; if (computer.tb_computerLogin(computer, 2) = 1) if (cmbLogin.Text = 后台数据维护) frmMain frm = new frmMain(); frm.Show(); this.Hide(); if (cmbLogin.Text = 系统点歌) frmDaiGe daige = new frmDaiGe(); daige.Show(); this.Hide(); else

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1