管理信息系统课程设计说明书示例

上传人:m**** 文档编号:67958020 上传时间:2022-04-01 格式:DOC 页数:22 大小:475.50KB
返回 下载 相关 举报
管理信息系统课程设计说明书示例_第1页
第1页 / 共22页
管理信息系统课程设计说明书示例_第2页
第2页 / 共22页
管理信息系统课程设计说明书示例_第3页
第3页 / 共22页
亲,该文档总共22页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
苏州科技学院管理信息系统课程设计说明书设计题目药店管理系统院系电子与信息工程学院专业计算机科学与技术学生姓名徐明惠学号 040421212起 迄日期 2008年06月31日 2008年07月08日设计地点天平学院计算中心班建民职称副教授指导教师一 职称1。设计目的巩固数据库的基本概念 ,结合实际的操作和设计,使学生掌握数据库系统 的基本概念、原理和技术 ,将理论与实际相结合,应用现有的数据建模工具和数 据库管理系统软件 ,规范、科学地完成一个小型数据库的设计与实现 .巩固C#程序设计基础知识:主要包括语言基础、窗体界面设计、文本文 件操作、数据库访问、数据绑定等。注意要养成良好的编码习惯:包括缩进、遵 循命名规范等 .结合软件工程知识了解一个实用系统的面向对象设计方法: 功能描述系 统设计模块设计 -类设计(本例中仅窗体类)。培养学生调查研究、 查阅技术文献、 资料、手册以及编写技术文献的能力, 把理论与实践相结合,提高其实际动手能力和创新能力。学会从用户的角度考虑界面构成,合理划分模块功能 ,使系统结构清晰、 易于设计和维护。2. 系统描述药店管理管理系统要求实现对药品的进、销、存(包括药品的入库、库存查询及出库)进行计算机管理。该系统主要包括以下内容:操作员身份验证进货要求更新库存表 (添加新行),打印入库单(本设计仅包括入库表单, 不打印),入库单表只许新增,不许修改和删除。库存要求查询功能,要求灵活地按照各字段模糊查询销售要求更新库存表(减少数量,数量为0时删除库存记录),打印出库单(本设计仅包括出库表单,不打印 ),出库单表只许新增,不许修改和删除。简单财务功能: (本设计不包含)3。系统分析与设计3.1系统总体设计其总体结构设计如下图:图3。1系统总体结构3.2模块分析与设计身份验证模块用户名密码无误方可进入主模块。系统主模块调用各子模块。入库子模块提供以下五种功能: 浏览入库单据信息; 添加入库单据,可以由操作员录入药品信息,提供撤消编辑功能; 保存新记录到数据库入库单表,并更新库存表; 自动计算该药品的总金额; 不许编辑已经保存到数据库的入库单信息。库存子模块提供灵活的库存查询功能,并显示查找结果;提供从库存界面直接出库的方便操作.出库子模块提供灵活的出库查询功能,并显示查找结果(进行模糊查询)身份修改子模块可以根据需要修改用户名和密码3.3数据结构药品信息的相关数据表结构入库单数据表结构列名数据类型长度允许空序号(主键)int (标识列,自动 增量1,种子1)4否入库单编号Char20是来货单位Nchar50是药品名称Nchar50是类别Nchar10是规格Nchar10是单位Nchar10是数量Int4是单价decimal9是总计decimal9是付款方式Nchar10是经办人Nchar10是入库日期Nchar10是产地Nchar50是生产日期Nchar10是有效期Nchar10是库存数据表结构列名数据类型长度允许空序号(主键)int (标识列,自动增量1种子1)4否来货单位Nchar50是药品名称Nchar50是类别Nchar10是规格Nchar10是单位Nchar10是产地Nchar50是入库日期Nchar10是生产日期Nchar10是数量Int4是单价decimal9是总计decimal9是有效期Nchar10是出库单数据表结构列名数据类型长度允许空序号(主键)出库单编号Char20否购买单位Nchar50是药品名称Nchar50是类别Nchar10是规格Nchar10是单位Nchar10是数量Int4是单价decimal9是总计decimal9是付款方式Nchar10是经办人Nchar10是出库日期Nchar10是产地Nchar50是生产日期Nchar10是有效期Nchar10是窗体类数据结构包括六个窗体:身份验证窗体,系统主模块窗体,入库窗体,库存窗体,出库窗 体,身份修改窗体。3。4算法分析总计=单价*数量this.textBoxzongji.Text=(Convert.ToDecimal( this.textBoxdanjia 。 Text )Convert.ToDecimal (this.textBoxshuliang.Text).ToString();4。各功能模块主要界面4。1身份验证模块身份验证设计界面图如下:用戶名暑码逍录取消图4.1身份验证设计界面4。2主模块主模块设计界面图如下:图4。2主模块设计界面4。3入库子模块入库子模块设计界面如下图图4。3入库子模块界面4.4库存子模块库存子模块设计界面图如下:图4。4库存子模块设计界面4。5出库子模块出库子模块设计界面图如下图4。5出库子模块界面4.6身份修改子模块库存子模块设计界面图如下:图4.6身份修改模块界面5。程序主要代码5.1登录的代码namespacekechengshejipublic partial classForml : Form private SqlConnection conn;private SqlCommand com; public int i = 0;private SqlDataReader reader public Form1 ()InitializeComponent ();conn = new SqlConnection(” server( local);database=coursedesign; integrated security=true) com = new SqlCommand ( ”,conn );com.CommandText =(select * from mima ” ;string name;string pwd ; conn.Open();reader = com.ExecuteReader() ;if ( reader.Read() )name = reader0.ToString( ) ;pwd = reader 1 。 ToString() ;if ( textBoxMima.Text 。 Trim( ) = pwd.Trim() & textBoxname.Text.Trim () = name.Trim( )formzhuchangti myform2 = new formzhuchangti () ; myform2.Show ( );elseMessageBox。 Show( ”密码或用户名错误 ! ”); textBoxname.Text = ”;textBoxMima.Text = ”;”i+;this。 Show();if (i = 3)MessageBox。Show (this,你的输入错误大于3次!关闭,提示” MessageBoxButtons.OK , MessageBoxIcon.Information );this。 Close();reader.Close(); conn.Close();private void 取丫肖 button_Click( object sender, EventArgs e)this.Close ( );5。2 药品进销存系统的设计的代码namespacekechengshejipublic partial class formzhuchangti : Formprivate SqlConnection conn;private SqlCommand com;private SqlDataReader reader;public formzhuchangti ()InitializeComponent ( );conn = new SqlConnection ( ” server(= local ) ;database=coursedesign;integrated security=tru e”);com = new SqlCommand( , conn); com.CommandText = ( select * from mima );private void button2_Click ( object sender, EventArgs e)Form5 myform5= new Form5( ) ; myform5 .Show ( ) ;private void 入库 ToolStripMenuItem_Click( object sender, EventArgs e)Formruku myform3 = new Formruku ( ); myform3.MdiParent = this; myform3.Show();private void 库存 ToolStripMenuItem_Click ( object sender, EventArgs e)Formkucun myform4 = new Formkucun () ; myform4 。 MdiParent = this; myform4.Show () ;Form5 myform5 = new Form5 ( ) ; myform5.MdiParent = this;myform5.Show ();private void form2_Load( object sender, EventArgs e) conn.Open();reader = com。 ExecuteReader();if ( reader.Read() )ToString ( ) ;EventArgs e)this.toolStripStatusLabel2.Text = DateTime .Now.ToString( ) this。 toolStripStatusLabel1.Text = 操作员: + reader0reader。 Close();conn。 Close();private void 修改用户信息 ToolStripMenuItem_Click( object sender, Formxiugai myform6 = new Formxiugai ( ); myform6.MdiParent = this; myform6 。 Show( );5.3 入库单代码的设置namespacekechengshejipublic partial class Formruku : Formprivate SqlConnection conn;private SqlCommand com;public Formruku ( )InitializeComponent ( );private void comboBox1_SelectedIndexChanged( object sender, EventArgs e)private void bindingNavigator1_RefreshItems( object sender, EventArgs e)private void Form3_Load( object sender, EventArgs e)/ TODO:这行代码将数据加载到表courseDesignDataSet。input”中。您可以 根据需要移动或移除它。this.inputTableAdapter.Fill( this.courseDesignDataSet。 input) ;textBoxbiaohao.DataBindings.Add( new Binding (” text,inputBindingSource, ”入 库单编号 ”);textBoxlaihuodanwei.DataBindings 。 Add( new Binding (” text, inputBindingSource, ”来货单位 ”);textBoxyaopinmingcheng 。 DataBindings 。 Add( new Binding (” text,” inputBindingSource, 药品名称 ”);textBoxguige 。 DataBindings。 Add( new Binding (” text,” inputBindingSource, ” 规格 );textBoxchandi 。 DataBindings.Add( new Binding ( ” text,” inputBindingSource, 产地 );textBoxshengchanriqi 。 DataBindings.Add( new Binding (text ,” inputBindingSource , 生产日期 ”);textBoxdanjia.DataBindings 。 Add(new Binding ( text , ”inputBindingSource, 单价 );textBoxzongji 。 DataBindings 。 Add(new Binding (text , ”inputBindingSource , 总计 ) );comboBoxfukuanfangshi.DataBindings 。 Add (new Binding(text , inputBindingSource , ”付款方式 );textBoxruluriqi 。 DataBindings.Add( new Binding ( ” text,” inputBindingSource , 入库日期 ”);textBoxyouxiaoqi.DataBindings.Add( new Binding (text ,”inputBindingSource , ” 有效期 ”) );textBoxdanwei.DataBindings.Add( new Binding(” text,”inputBindingSource , 单位 );textBoxshuliang 。 DataBindings.Add( new Binding( text , ”inputBindingSource , ”数量 ) ;textBoxjingbanren.DataBindings。Add(new Binding (text, inputBindingSource, ”经办人 ) );comboBoxleibie.DataBindings 。 Add ( new Binding (”text,inputBindingSource, ” 类别 ”) );this.toolStripStatusLabel2 。 Text = 第 + bindingNavigatorPositionItem.Text +页”;this。 toolStripStatusLabel4 。 Text = 共 + bindingNavigatorCountItem 。 Text + ” 页入库单 ”;private void button1_Click( object sender, EventArgs e)this.textBoxzongji 。 Text = (Convert。 ToDecimal ( this.textBoxdanjia 。 Text) * Convert。 ToDecimal (this。 textBoxshuliang.Text) ).ToString();private void bindingNavigatorMoveNextItem1_Click ( object sender, EventArgs e)private void toolStripStatusLabel1_Click( object sender, EventArgs e)private void toolStripStatusLabel2_Click ( object sender, EventArgs e)private void toolStripButton1_Click ( object sender, EventArgs e)private void bindingNavigatorAddNewItem1_Click( object sender, EventArgs e)textBoxbiaohao.Text = I ”+ DateTime 。 Now.ToString () ;textBoxruluriqi.Text = DateTime。 Now.ToString() ;private void toolStripButton4_Click ( object sender, EventArgs e) this。 inputBindingSource.EndEdit( ) ;this 。 inputTableAdapter 。 Update( this 。 courseDesignDataSet.input );conn = new SqlConnection ( ” server(= local ) ;database=coursedesign;integrated security=true ”);com = new SqlCommand( ”, conn);com .CommandText = insert into store values ( ”+textBoxbiaohao .Text+, +t”extBoxlaihuodanwei 。Text+ , +”textBoxyaopinmingcheng .Text+ , +textBoxguige .Text+ ” ,+ te”xtBoxchandi 。Text+ ” ,+te”xtBoxshengchanriqi .Text+ ”, ”+textBoxdanjia .Text+”, +”textBoxzongji .Text+ , +”textBoxyouxiaoqi 。Text+ , +”textBoxruluriqi .Text+ ”, +”textBoxdanwei .Text+ , +”textBoxshuliang 。 Text+ , +textBoxjingbanren 。 Text+ ” , +comboBoxleibie .Text+ ”, +comboBoxfukuanfangshi 。 Text+ )”;private void bindingNavigatorDeleteItem1_Click ( object sender, EventArgs e) textBoxbiaohao 。 Text = ” I+ DateTime .Now.ToString( ) ; textBoxlaihuodanwei。Text = ”; textBoxyaopinmingcheng 。 Text = ”;textBoxguige 。 Text = ”; textBoxchandi 。 Text = ; textBoxshengchanriqi 。 Text = ; textBoxdanjia 。 Text = ”; textBoxzongji 。 Text = ; textBoxruluriqi.Text = DateTime.Now 。 ToString( );textBoxyouxiaoqi 。 Text = ” ;” textBoxdanwei 。 Text = ”; textBoxshuliang.Text = ; textBoxjingbanren.Text = ”; comboBoxleibie.Text = ”;” comboBoxfukuanfangshi 。 Text = ”;”private void toolStripButton3_Click( object sender, EventArgs e) textBoxbiaohao.Text = I ”+ DateTime 。 Now。 ToString() textBoxlaihuodanwei 。 Text = ”; textBoxyaopinmingcheng 。 Text = ;textBoxguige.Text = ”;textBoxchandi。Text =”; textBoxshengchanriqi 。 Text = ”; textBoxdanjia.Text = ; textBoxzongji 。 Text = ; textBoxruluriqi 。 Text = DateTime 。 Now 。 ToString();textBoxyouxiaoqi 。 Text = ”; textBoxdanwei.Text = ”;” textBoxshuliang 。 Text = ; textBoxjingbanren 。 Text = ”; comboBoxleibie 。 Text = ”;” comboBoxfukuanfangshi.Text = ”;5。4 库存查询的相关代码namespacekechengshejipublic partial classFormkucun : FormSqlConnection conn;SqlCommand com;SqlDataAdapter ad;BindingSource sour;DataTable ta;public Formkucun( )InitializeComponent();private void storeBindingNavigatorSaveItem_Click ( object sender, EventArgs e) this。 Validate () ;this。 storeBindingSource.EndEdit() ; (this.courseDesignDataSet。 store);private void Form4_Load ( object sender, EventArgs e)II TODO:这行代码将数据加载到表courseDesignDataSet。store”中.您可以 根据需要移动或移除它。this。 storeTableAdapter.Fill ( this。 courseDesignDataSet。 store);private void storeBindingNavigator_RefreshItems (object sender, EventArgs e)private void toolStripButton1_Click( object sender, EventArgs e)conn = new SqlConnection(” server(= local) ;database=coursedesign;integrated security=true );com = new SqlCommand(select from store where + chaxun.SelectedItem 。ToString () + like+%z”hi 。 Text + ”, conn);ad = new SqlDataAdapter(com);sour = new BindingSource();ta = new DataTable();sour。 DataSource = ta;ad。 Fill (ta);storeDataGridView 。 DataSource = sour;private void toolStripComboBox1_Click( object sender, EventArgs e)private void fillByToolStripButton_Click( object sender, EventArgs e)trythis.storeTableAdapter.FillBy (this。 courseDesignDataSet。 store);catch ( System.Exception ex)System.Windows 。 Forms。 MessageBox.Show( ex。 Message)5.5 出库相关代码namespacekechengsheji public partial class Form5 : Formpublic Form5()InitializeComponent () ;private void outputBindingNavigatorSaveItem_Click (object sender, EventArgs e) this .Validate ();this .outputBindingSource.EndEdit () ;this .outputTableAdapter.Update ( this.courseDesignDataSet.output);private void Form5_Load ( object sender, EventArgs e)/ TODO:这行代码将数据加载到表courseDesignDataSet。output”中。您可以根据需要移动或移除它。this.outputTableAdapter 。 Fill( this.courseDesignDataSet。 output);private void bindingNavigatorAddNewItem_Click( object sender, EventArgs e)private void bindingNavigatorMovePreviousItem_Click( object sender, EventArgs e)private void outputDataGridView_CellContentClick( object sender, DataGridViewCellEventArgs e)5。6 用户信息修改代码namespacekechengshejipublic partial class Formxiugai : Formprivate SqlConnection conn;private SqlCommand com, comm; public Formxiugai()InitializeComponent () ;private void button1_Click ( object sender, EventArgs e)if ( xinyonghuming .Text != )if (xinmima .Text ! =)conn = new SqlConnection(” server=)(lo;dcatlabase=coursedesign;integratedsecurity=true) ;com = new SqlCommand( ”,conn); com.CommandText = ( ” select * from mima ); ”this.mimaTableAdapter.Insert(xinyonghuming.Text 。 ToString (), xinmima.Text.ToString ( ) ;this .mimaTableAdapter 。Fill (this 。courseDesignDataSet。mima );private void mimaBindingNavigatorSaveItem_Click( object sender, EventArgs e) this.Validate(); this.mimaBindingSource 。 EndEdit(); this。 mimaTableAdapter 。 );private void Form6_Load(object sender, EventArgs e)/ TODO: 这行代码将数据加载到表 “courseDesignDataSet.mima 中。您可以根 据需要移动或移除它。this.mimaTableAdapter 。 Fill( this 。 courseDesignDataSet.mima);xinyonghuming 。 DataBindings.Add (new Binding (” text, mimaBindingSource, ” name) );xinmima。DataBindings.Add( new Binding (text,“mimaBindingSource , ” mima)”) ;6. 设计过程中遇到的主要问题如何绑定入库单中各数据项控件 通过老师的提示及看课本上的例题, 知道了如何通过编代码绑定入库单中各 数据项控件 .另外,还学会了一种比较简便的方法即先添加数据源,右击要绑定的控件,选择属性中的datebindings的Text属性点倒三角选择数据源.如何设置父窗体一开始以为设置父窗体只要写代码Formruku myform3 = new Formruku( );myform3.MdiParent = this ;myform3。 Show ();就可以了,可是一运行老是有错误。后来把窗体的属性 Ismdicontainer 的属 性改为True就可以运行了 .7。总结课程设计以前, 真的没有想到会这么紧张。 本来以为课程设计顶多就是多写 的字,多费点时间罢了。通过这次的课程设计我真得懂得了许多 .以前本来“学 不会的东西” 其实就是没有那种必须要学会的紧迫感。 通过本周的课程设计我学 会了许多。也感受了许多 .也以为课程设计这样偌大的一个工程,就我们这水平 是根本做不出来任何东西的 .结果通过一个星期的努力证明,通过我们的合作是 可以做出东西来的 ,虽然中途也遇到过种种困难,通过老师的帮助也都一一解决。 我现在才真正的体会到课程设计是真得非常有必要 .我的成绩是老师的汗水 ! 谢谢你班老师 !
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 活动策划


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!