模块开发卷宗.doc_第1页
模块开发卷宗.doc_第2页
模块开发卷宗.doc_第3页
模块开发卷宗.doc_第4页
模块开发卷宗.doc_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

模块开发卷宗1标题软件系统名称:凌云办公系统标识符:LYOA程序编制员签名:电子商务一班第三组修改完成日期: 2011年6月13日编排日期:2011年6月15日2模块开发情况表1. 公司决策模块:该模块允许企业决策者决定各个主管部门的责任范围。2. 部门决策模块: 该模块允许企业各个部门决策者,查看决策,撰写决策草案.审核决策草案。3. 员工信息模块:该模块允许企业员工查看公司员工,添加入职人员信息,查看人员调动,查看离职人员信息。4. 内部交流模块:该模块允许企业各个层次人员添加留言,表达个人观点。3功能说明本模块的功能,主要是输入、要求的处理、输出。可以从系统设计说明书中摘录。同时列出在软件需求说明书中对这些功能的说明的条款。4设计说明本组模块的设计考虑包括:1.在系统设计说明书中有关对本模块设计考虑的叙述,包括本模块在软件系统中所处的层次,它同其他模块的接口;2在程序设计说明书中有关对本模块的设计考虑,包括本模块的算法、处理流程、牵涉到的数据文卷设计限制、驱动方式和出错信息等;3在编制目前已通过全部测试的源代码时实际使用的设计考虑。5原代码清单系统登陆验证代码:protectedvoidbutton1_click(objectsender,EventArgse)if(uname.Text=|upwd.Text=)Response.Write(alert(登陆名和密码不能为空!);return;elsestringstrName=uname.Text;stringstrPwd=upwd.Text;stringsqlstr=select*fromPersonwherePerson_UserName=+uname+andPerson_Pwd=+pwd+andPerson_IsConfirm=true;SqlConnectionconn=newSqlConnection(server=localhost;Uid=sa;Pwd=123;database=OA);SqlCommandcmd=newSqlCommand(sqlstr,conn);SqlParameterUname=newSqlParameter(uname,uname.Text);SqlParameterUpwd=newSqlParameter(pwd,upwd.Text);cmd.Parameters.Add(Uname);cmd.Parameters.Add(Upwd);tryconn.Open();DataTabledt=newDataTable();dt.Load(cmd.ExecuteReader();if(dt.Rows.Count=0)Response.Write(alert(登陆名或密码错误,或未被审核);return;else/lect*fromCompanyDecisioncdinnerjoinPersonpsoncd.Person_ID=ps.Person_IDinnerjoinDepartMentdptonps.Dept_ID=dpt.Dept_IDSessionUserLevel=dt.Rows0Person_Level.ToString();SessionUsername=uname.Text;SessionUserRname=dt.Rows0Person_RealName.ToString();SessionUserID=dt.Rows0Person_ID.ToString();SessionDeptID=dt.Rows0Dept_ID.ToString();SessionUserInform=dt.Rows0Person_Inform.ToString();/SessionName=dt.Rows0Person_RealName.ToString();/Response.Write(SessionUserLevel.ToString();conn.Close();Response.Redirect(/main.aspx?user=+SessionUserID);catch(Exceptionerr)Response.Write(err);在main.aspx中用repeater分页显示公司决策,并有翻页模块:public void bind() string sqsl = select * from CompanyDecision where Dept_ID=6 order by CD_ID DESC; SqlConnection conn = new SqlConnection(server=localhost;Uid=sa;Pwd=123;Database=OA); SqlCommand cmd = new SqlCommand(sqsl, conn); conn.Open(); SqlDataReader drd = cmd.ExecuteReader(); DataTable dtb = new DataTable(); dtb.Load(drd); conn.Close(); /Repeater1.DataSource = dtb; /Repeater1.DataBind(); /分页实现 PagedDataSource pds = new PagedDataSource(); pds.DataSource = dtb.DefaultView; pds.AllowPaging = true; pds.PageSize = 9; Repeater1.DataSource = pds; pds.CurrentPageIndex = Convert.ToInt32(this.Ltl_Page.Text)-1; Ltl_CountPage.Text = pds.PageCount.ToString(); Lbtn_FirstPage.Enabled = true; Lbtn_PritPage.Enabled = true; Lbtn_NextPage.Enabled = true; Lbtn_LastPage.Enabled = true; if(pds.CurrentPageIndex1) Lbtn_FirstPage.Enabled = false; Lbtn_PritPage.Enabled = false; Ddl_JumptPage.Items.Clear(); for (int i = 0; i pds.PageCount; i+) Ddl_JumptPage.Items.Add(i + 1).ToString(); if(pds.CurrentPageIndex=pds.PageCount-1) Lbtn_NextPage.Enabled = false; Lbtn_LastPage.Enabled = false; Repeater1.DataBind(); Ddl_JumptPage.SelectedIndex = int.Parse(Ltl_Page.Text) - 1; 在点击CompanyDecision_Add.aspx中的Button后的保存语句:protected void bt1_Click(object sender, EventArgs e) if (TextBox1.Text = | TextBox2.Text = ) Response.Write(alert(标题|作者|连接不能为空!) ); return; else string dpt = SessionDeptID.ToString(); string sqlcmd = insert into CompanyDecision(CD_Title,CD_Content,Person_ID,CD_IsConfirm,CD_AddDate,CD_ConfirmDate,Dept_ID)values(title,content,userid,true, + DateTime.Now.ToString() + , + DateTime.Now.ToString() + , + dpt + ); int uid = Convert.ToInt32( SessionUserID.ToString(); SqlConnection conn = new SqlConnection(Server=localhost;Uid=sa;Pwd=123;database=OA); conn.Open(); SqlCommand cmd = new SqlCommand(sqlcmd, conn); SqlParameter Ctitle = new SqlParameter(title,TextBox1.Text); SqlParameter Ccontent = new SqlParameter(content,TextBox2.Text); SqlParameter Uid = new SqlParameter(userid,uid); /SqlParameter Acont = new SqlParameter(acont, TextArea1.Value); cmd.Parameters.Add(Ctitle); cmd.Parameters.Add(Ccontent); cmd.Parameters.Add(Uid); /cmd.Parameters.Add(Acont); cmd.ExecuteNonQuery(); conn.Close(); Response.Write(alert(保存成功!) ); Response.Redirect(DecisionList.aspx); 在Product_Add.aspx(采购订单添加页面)的Button(保存按钮)的后台执行语句:protected void bt1_Click(object sender, EventArgs e) int a = Convert.ToInt32(TextBox2.Text); int b = Convert.ToInt32(TextBox3.Text); money =Convert.ToString( a * b); string pid=SessionUserID.ToString(); prdname = TextBox1.Text; prov_name = DropDownList1.SelectedValue.ToString(); /验证 数据库中是否已经存在这种商品。 sqlstr = select * fromProducts ps inner join Provider prov on ps.Prov_ID=prov.Prov_ID where Product_Name =+prdname+and Prov_CName=+prov_name+; SqlConnection conn = new SqlConnection(server=localhost;Uid=sa;Pwd=123;Database=OA); conn.Open(); SqlCommand cmd = new SqlCommand(sqlstr, conn); SqlDataReader drd = cmd.ExecuteReader(); DataTable dtb = new DataTable(); dtb.Load(drd); conn.Close(); /若不存在这种商品 则对商品表进行添加操作,并同时添加这个采购单 if (dtb.Rows.Count = 0) /读取供货商中的供货商编号 sqlstr = select * from Provider where Prov_CName= + prov_name + ; SqlConnection conn2 = new SqlConnection(server=localhost;Uid=sa;Pwd=123;Database=OA); conn2.Open(); SqlCommand cmd2 = new SqlCommand(sqlstr, conn2); SqlDataReader drd2 = cmd2.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(drd2); prov_id = dt.Rows0Prov_ID.ToString(); /向商品表中添加这个商品 sqlstr = insert into Products(Product_Name,Product_Price,Prov_ID,Person_ID,Product_AddDate,Product_Inform)values(+TextBox1.Text+,+TextBox2.Text+,+prov_id+,+pid+,+DateTime.Now.ToString()+,+TextBox5.Text+); prdname=TextBox1.Text; cmd2 = new SqlCommand(sqlstr,conn2); cmd2.ExecuteNonQuery(); /从商品表中读取商品编号 conn2.Close(); SqlConnection conn3 = new SqlConnection(server=localhost;Uid=sa;Pwd=123;Database=OA); conn3.Open(); sqlstr = select * from Products prd inner join Provider prov on prd.Prov_ID = prov.Prov_ID where Product_Name= + prdname + and Prov_CName= + prov_name + ; SqlCommand cmd3 = new SqlCommand(sqlstr, conn3); SqlDataReader drd3 = cmd3.ExecuteReader(); DataTable dt1 = new DataTable(); dt1.Load(drd3); prdid = dt1.Rows0Product_ID.ToString(); /向采购表中添加这个采购单 sqlstr = insert into Product_Order(Product_ID,Product_Name,Product_Number,Product_Price,Order_Money,Order_IsConfirm,Order_IsPay,Prov_ID,Person_ID,Order_Inform,Order_AddDate)values( + prdid + , + TextBox1.Text + , + TextBox3.Text + , + TextBox2.Text + , + money + ,false,false, + prov_id + , + pid + , + TextBox5.Text + , + DateTime.Now.ToString() + ); /sqlstr = insert into Product_Order(Product_ID,Product_Name,Product_Number,Product_Price,Order_Money,Order_IsConfirm,Order_IsPay,Prov_ID,Person_ID,Oder_Inform,Order_AddDate)values( + prdid + , + TextBox1.Text + , + TextBox3.Text + , + TextBox2.Text + , + money + ,false,false, + prov_id + , + prdid + , + TextBox5.Text + , + DateTime.Now.ToString() + ); cmd2 = new SqlCommand(sqlstr, conn3); cmd2.ExecuteNonQuery(); conn2.Close(); Response.Redirect(./Purchase/ProductList.aspx); else/若已经存在这个商品 则直接添加这个采购单 /读取供货商中的供货商编号和商品编号 prov_id = dtb.Rows0Prov_ID.To

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论