1、周信飞组办公事务管理系统小组名单:周信飞,杨鹏,胡铎,李永五任务分配:周信飞:登陆界面与主界面设计,各模块间调试与修改。杨鹏、胡铎:修改、删除、添加等模块设计。李永五:相关资料查询,代码补充。一、系统介绍与需求分析1.系统开发环境 Windows XP,VS2005,SQL2000.2.系统简介一个协助各单位科学、全面、高效地进行办公事务管理的系统,根植于国内企事业单位办公管理的实际情况,实用而科学。包括培训管理、会议管理、车辆管理、资料管理、系统设置等。内容全面,分类科学。它集输入、维护、查询、筛选、统计和各种处理为一体,信息导入导出方便共享,灵活、专业的报表设计,形象、增强的数据处理,完美
2、的信息图形分析,用户可自定义自开发这些功能。3.需求分析:1功能分析:通过本系统实现企业办公自动化,功能包括培训管理、会议管理、车辆管理、资料管理。2性能分析:通过系统实现对人员、会议、资料的修改、删除、添加等一系列操作。二、系统设计1.系统流图:2.功能模块设计本系统本着实用化的设计思想,共分五大功能模块,分别为:(1)培训管理:该模块主要实现培训人员信息的添加、修改和删除,以及信息的查询(支持直接查询、模糊查询和权限查询)和生成报表。(2)会议管理:该模块主要实现会议记录的添加、修改和删除,并能通过输入时间段查询该时间段的所有会议信息,对绝密的会议记录设置查询权限,只允许有查询权限的用户查
3、询。(3)车辆管理:该模块主要是为单位管理本单位的车辆而开发,它主要包括车辆管理子模块、驾驶员管理子模块、查询统计子模块,其中以车辆管理子模块为主要模块。在车辆管理子模块中包括车辆登记、购车信息录入、车辆外修记录、车辆保险记录等四个功能模块;在查询统计子模块中,根据车辆信息可以查询到购车信息、车辆外修记录、车辆保险记录,也可根据驾驶员信息查询到车辆信息。(4)资料管理:该模块主要包括行文管理、往来信函管理、文件督办管理、报表管理。并对资料实现分部门管理,通过部门信息可以查询该部门的资料。(5)系统设置:该模块主要包括用户信息的添加、修改和删除,用户信息包括用户名,用户类型(即该用户的系统访问权
4、限和系统编辑权限)、用户密码。三、系统登陆模块设计namespace OfficeManager public partial class frmLogin : Form public frmLogin() /frm_Loing这个窗口类的构造函数,所以我们在这里可以进行一些初始设置 by TMLi InitializeComponent(); cb_Type.Items.Add(系统管理员); cb_Type.Items.Add(部门负责人); cb_Type.Items.Add(普通用户); cb_Type.Text = cb_Type.Items0.ToString(); /让combo
5、x的默认显示系统管理员这个选项 cb_IsID.Checked = true; edit_Name.Text = 1001; edit_Password.Text = 123; this.StartPosition = FormStartPosition.CenterScreen; private void btn_Login_Click(object sender, EventArgs e) string sqlstr; Conn mycon = new Conn(); if (edit_Name.Text.Trim() = | edit_Password.Text.Trim() = ) M
6、essageBox.Show(请输入用户名和密码!, 提示); else if (this.cb_IsID.Checked) sqlstr = SELECT * FROM Sys_User WHERE ID = + edit_Name.Text.Trim() + + and PassWord= + edit_Password.Text.Trim() + + and Type= + cb_Type.SelectedIndex; else sqlstr = SELECT * FROM Sys_User WHERE UserName = + edit_Name.Text.Trim() + + and
7、 PassWord= + edit_Password.Text.Trim() + + and Type= + cb_Type.SelectedIndex; SqlCommand cmd = new SqlCommand(sqlstr, mycon.connstr); if (cmd.ExecuteScalar() != null) this.Visible = false; frmMain main = new frmMain(); if (this.cb_IsID.Checked) main.UserID = edit_Name.Text.Trim(); main.UserName = ;
8、else main.UserName = edit_Name.Text.Trim(); main.UserID = ; main.frmlogin = this; main.type = cb_Type.Text.ToString().Trim(); main.Tag = this.FindForm(); main.Visible = true; main.Refresh(); if (cb_Type.SelectedIndex = 0) /给管理员权限 main.m_priority = 0; else /给普通用户权限 main.m_priority = 1; else MessageBo
9、x.Show(用户名、密码或权限错误!n请检查用户名(或ID)与密码和权限。, 警告); mycon.connstr.Close(); private void btn_Cancel_Click(object sender, EventArgs e) this.Close(); 四、主窗体设计办公管理系统模块:namespace OfficeManager public partial class frmMain : Form public int m_priority; public frmLogin frmlogin; public string UserName; public stri
10、ng UserID; public string type; public int tTrain,tMeeting,tCar,tData; public frmMain() InitializeComponent(); this.IsMdiContainer = true; this.WindowState = FormWindowState.Maximized; private void frmMain_FormClosing(object sender, FormClosingEventArgs e) frmlogin.Close(); private void frmMain_Load(
11、object sender, EventArgs e) DateTime dt = new DateTime(); dt = System.DateTime.Now; string strtime; tss_Time.Text = 登陆时间: + dt.Year + - + dt.Month + - + dt.Day + + dt.Hour + : + dt.Minute + : + dt.Second; strtime = tss_Time.Text.ToString().Trim(); if (m_priority = 1) tss_Type.Text = 当前用户身份:管理员; else
12、 tss_Type.Text = 当前用户身份:一般用户; string strsql = ; if (UserName != ) strsql = SELECT * FROM Sys_User where UserName = + UserName + ; /在cb_UserName中显示已有的用户名 tss_UserName.Text = 当前登陆用户名: + UserName; else strsql = SELECT * FROM Sys_User where ID = + UserID + ; tss_UserName.Text = 当前登陆用户ID: + UserID; Conn
13、myconn1 = new Conn(); string strsql1 = Insert into Log (LUserID,LUserName,LUserType,LDateTime) values (+UserID +,+UserName+,+m_priority+,+strtime+); SqlCommand cmd1 = new SqlCommand(strsql1, myconn1.connstr); SqlDataAdapter da1 = new SqlDataAdapter(); DataSet dataset1 = new DataSet(); da1.SelectComm
14、and = cmd1; da1.Fill(dataset1, sys_log); cmd1.ExecuteNonQuery(); Conn myconn = new Conn(); SqlCommand cmd = new SqlCommand(strsql, myconn.connstr); SqlDataAdapter da = new SqlDataAdapter(); DataSet dataset = new DataSet(); da.SelectCommand = cmd; da.Fill(dataset, sys_user); for (int i = 0; i dataset
15、.Tablessys_user.Rows.Count; i+) DataRow dr = dataset.Tablessys_user.Rowsi; if (dr4.ToString().Trim() = 1) tsb_Train.Visible = true; this.m1.Visible = true; else tsb_Train.Visible = false; /this.menuStrip1.Items0.Visible = false; this.m1.Visible = false; if (dr5.ToString().Trim() = 1) tsb_Meeting.Vis
16、ible = true; this.m2.Visible = true; else tsb_Meeting.Visible = false; this.m2.Visible = false; if (dr6.ToString().Trim() = 1) tsb_Car.Visible = true; this.m3.Visible = true; else tsb_Car.Visible = false; this.m3.Visible = false; if (dr7.ToString().Trim() = 1) tsb_Data.Visible = true; this.m4.Visibl
17、e = true; else tsb_Data.Visible = false; this.m4.Visible = true; if (dr8.ToString().Trim() = 1) this.tsb_SysSetting.Visible = true; this.m6.Visible = true; else tsb_SysSetting.Visible = false; this.m6.Visible = false; tTrain = int.Parse(dr9.ToString().Trim(); tMeeting = int.Parse(dr10.ToString().Tri
18、m(); tCar = int.Parse(dr11.ToString().Trim(); tData = int.Parse(dr12.ToString().Trim(); /cb_UserName.Items.Add(dr1.ToString().Trim(); myconn.connstr.Close(); private void tsb_Train_Click(object sender, EventArgs e) tsb_Train.Enabled = false; frmTrain frm = new frmTrain(); frm.frmmain = this; frm.typ
19、e = tTrain; frm.MdiParent = this; frm.WindowState = FormWindowState.Maximized; frm.Tag = this.FindForm(); /Train=1; if (frm.Train=1) frm.Show(); else frm.Close(); private void tsb_Logout_Click(object sender, EventArgs e) this.Close(); private void tsb_SysSetting_Click(object sender, EventArgs e) frm
20、System frm = new frmSystem(); frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); private void tsb_Meeting_Click(object sender, EventArgs e) tsb_Meeting.Enabled = false; frmMeeting frm = new frmMeeting(); frm.frmmain = this; frm.MdiParent = this; frm.type = tMeeting; frm.WindowStat
21、e = FormWindowState.Maximized; frm.Show(); if (frm.Meeting = 1) frm.Show(); else frm.Close(); private void tsb_Car_Click(object sender, EventArgs e) tsb_Car.Enabled = false; frmCar frm = new frmCar(); frm.frmmain = this; frm.type = tCar; frm.MdiParent = this; frm.StartPosition = FormStartPosition.Ce
22、nterParent; frm.WindowState = FormWindowState.Maximized; frm.Show(); /tsb_Car.Enabled = true; if (frm.Car = 1) frm.Show(); else frm.Close(); private void tsb_Data_Click(object sender, EventArgs e) frmData frm = new frmData(); frm.frmmain = this; frm.type = tData; if (this.UserName != ) frm.UserName
23、= this.UserName; else frm.UserName = this.UserID; frm.MdiParent = this; tsb_Data.Enabled = false; frm.StartPosition = FormStartPosition.CenterParent; frm.WindowState = FormWindowState.Maximized; frm.Show(); if (frm.Data = 1) frm.Show(); else frm.Close(); private void testToolStripMenuItem_Click(obje
24、ct sender, EventArgs e) / frmReport frm = new frmReport(); / frm.Show(); private void tsb_Help_Click(object sender, EventArgs e) frmAbout frm = new frmAbout(); frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); private void frmMain_FormClosing(object sender, EventArgs e) this.frml
25、ogin.Close(); this.Close(); private void 登陆日志ToolStripMenuItem_Click(object sender, EventArgs e) frmLog frm = new frmLog(); frm.ShowDialog() ; private void 层叠ToolStripMenuItem_Click(object sender, EventArgs e) for (int i = 0; i this.MdiChildren.Length; i+) this.MdiChildreni.Close(); private void 最小化
26、ToolStripMenuItem_Click(object sender, EventArgs e) for (int i = 0; i this.MdiChildren.Length; i+) this.MdiChildreni.WindowState= FormWindowState.Minimized; private void 最大化ToolStripMenuItem_Click(object sender, EventArgs e) for (int i = 0; i this.MdiChildren.Length; i+) this.MdiChildreni.WindowStat
27、e = FormWindowState.Maximized; private void 正常ToolStripMenuItem_Click(object sender, EventArgs e) for (int i = 0; i this.MdiChildren.Length; i+) this.MdiChildreni.WindowState = FormWindowState.Normal; private void 水平平铺ToolStripMenuItem_Click(object sender, EventArgs e) this.LayoutMdi(MdiLayout.TileHorizontal); private void toolStripMenuItem1_Click(object sender, EventArgs e) 资料管理模块五、课程设计心得体会通过本次课程设计,我们学会了如何去做好一个软件系统。包括它的前期需求分析,目标要求,代码填充,以及对相关专业知识的掌握。刚开始,我们没有明确的目标,不知道如何下手,后来通过老师的指导,我们顺利的完成了此次的课程设计。这对我们以后的学习和工作都有着很大的帮助意义。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1