软件著作权源程序模板.doc_第1页
软件著作权源程序模板.doc_第2页
软件著作权源程序模板.doc_第3页
软件著作权源程序模板.doc_第4页
软件著作权源程序模板.doc_第5页
已阅读5页,还剩58页未读 继续免费阅读

下载本文档

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

文档简介

此文档收集于网络,如有侵权,请联系网站删除 源程序清单 办公自动化系统 using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Configuration;using System.Data.SqlClient;namespace OfficeOnline/ / AddAdvice 的摘要说明。/ public class AddAdvice : System.Web.UI.Pageprotected System.Web.UI.WebControls.TextBox tbxempname;protected System.Web.UI.WebControls.TextBox tbxtitle;protected System.Web.UI.WebControls.TextBox tbxcontent;protected System.Web.UI.WebControls.Button btnSubmit;private void Page_Load(object sender, System.EventArgs e)/ 在此处放置用户代码以初始化页面#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void btnSubmit_Click(object sender, System.EventArgs e)/创建数据库连接和命令对象SqlConnection objconn = new SqlConnection(ConfigurationSettings.AppSettingsconnstr);objconn.Open();SqlCommand objcmd=new SqlCommand(AddAdvice,objconn);/设定命令类型为存储过程objcmd.CommandType=CommandType.StoredProcedure;/添加参数/员工姓名SqlParameter paramEmpName=new SqlParameter(EmpName,SqlDbType.NVarChar,20);paramEmpName.Value=tbxempname.Text;objcmd.Parameters.Add(paramEmpName);/标题 SqlParameter paramTitle=new SqlParameter(Title,SqlDbType.NVarChar,50);paramTitle.Value=tbxtitle.Text;objcmd.Parameters.Add(paramTitle);/内容SqlParameter paramContent = new SqlParameter(Content,SqlDbType.NVarChar,4000);paramContent.Value=tbxcontent.Text;objcmd.Parameters.Add(paramContent);/执行命令objcmd.ExecuteNonQuery();/关闭数据库连接objconn.Close();Response.Redirect(Advice.aspx);using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Configuration;using System.Data.SqlClient;namespace OfficeOnline/ / AddDpt 的摘要说明。/ public class AddDpt : System.Web.UI.Pageprotected System.Web.UI.WebControls.TextBox tbxname;protected System.Web.UI.WebControls.TextBox tbxmanager;protected System.Web.UI.WebControls.TextBox tbxtel;protected System.Web.UI.WebControls.TextBox tbxfax;protected System.Web.UI.WebControls.TextBox tbxaddress;protected System.Web.UI.WebControls.ImageButton ImageButton1;private void Page_Load(object sender, System.EventArgs e)/ 在此处放置用户代码以初始化页面#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)/ 创建数据库连接对象SqlConnection objconn=new SqlConnection(ConfigurationSettings.AppSettingsconnstr);objconn.Open();SqlCommand objcmd=new SqlCommand(AddDpt,objconn);objcmd.CommandType=CommandType.StoredProcedure;SqlParameter paramDptName= new SqlParameter(DptName,SqlDbType.NVarChar,100);paramDptName.Value=tbxname.Text ;objcmd.Parameters.Add(paramDptName);SqlParameter paramDptManager= new SqlParameter(DptManager,SqlDbType.NVarChar,16);paramDptManager.Value=tbxmanager.Text ;objcmd.Parameters.Add(paramDptManager);SqlParameter paramDptTel= new SqlParameter(DptTel,SqlDbType.NVarChar,50);paramDptTel.Value=tbxtel.Text ;objcmd.Parameters.Add(paramDptTel);SqlParameter paramDptFax= new SqlParameter(DptFax,SqlDbType.NVarChar,50);paramDptFax.Value=tbxfax.Text;objcmd.Parameters.Add(paramDptFax);SqlParameter paramDptAddress= new SqlParameter(DptAddress,SqlDbType.NVarChar,500);paramDptAddress.Value=tbxaddress.Text ;objcmd.Parameters.Add(paramDptAddress);objcmd.ExecuteNonQuery();objconn.Close();Response.Redirect(Department.aspx);using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Configuration;using System.Data.SqlClient ;namespace OfficeOnline/ / AddSch 的摘要说明。/ public class AddSch : System.Web.UI.Pageprotected System.Web.UI.WebControls.TextBox tbxcontent;protected System.Web.UI.WebControls.TextBox tbxsubject;protected System.Web.UI.WebControls.TextBox tbxplace;protected System.Web.UI.WebControls.DropDownList dplschtype;protected System.Web.UI.WebControls.TextBox tbxtime;protected System.Web.UI.WebControls.Button btnadd; private void Page_Load(object sender, System.EventArgs e)if (!IsPostBack)/创建数据库连接和命令对象SqlConnection objconn = new SqlConnection(ConfigurationSettings.AppSettingsconnstr);objconn.Open();string objsql=Select SchTypeName from SchType;SqlDataAdapter da = new SqlDataAdapter(objsql,objconn);/创建并填充DataSetDataSet ds = new DataSet();da.Fill(ds,SchType); dplschtype.DataSource=ds;dplschtype.DataMember=SchType;dplschtype.DataTextField =SchTypeName;dplschtype.DataBind();objconn.Close();#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.btnadd.Click += new System.EventHandler(this.btnadd_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void btnadd_Click(object sender, System.EventArgs e)/创建数据库连接和命令对象SqlConnection objconn = new SqlConnection(ConfigurationSettings.AppSettingsconnstr);SqlCommand objcmd = new SqlCommand(AddSch,objconn);objcmd.CommandType=CommandType.StoredProcedure;/添加参数/员工编号SqlParameter paramEmpID = new SqlParameter(EmpID,SqlDbType.Int);paramEmpID.Value =Convert.ToInt32(SessionEmpID);/paramEmpID.Value =1;objcmd.Parameters.Add(paramEmpID);/日程类型编号SqlParameter paramSchTypeID2 = new SqlParameter(SchTypeID,SqlDbType.Int);paramSchTypeID2.Value =Convert.ToInt32(dplschtype.SelectedIndex+1);objcmd.Parameters.Add(paramSchTypeID2);/日程主题SqlParameter paramSubject=new SqlParameter(Subject,SqlDbType.NVarChar,50);paramSubject.Value=tbxsubject.Text;objcmd.Parameters.Add(paramSubject);/日程内容SqlParameter paramContent = new SqlParameter(Content,SqlDbType.NVarChar,4000);paramContent.Value=tbxcontent.Text;objcmd.Parameters.Add(paramContent);/时间SqlParameter paramDate = new SqlParameter(Date,SqlDbType.DateTime);paramDate.Value=Convert.ToDateTime(tbxtime.Text);objcmd.Parameters.Add(paramDate);/短时间SqlParameter paramShortDate=new SqlParameter(ShortDate,SqlDbType.DateTime);paramShortDate.Value=Convert.ToDateTime(tbxtime.Text).ToShortDateString();objcmd.Parameters.Add(paramShortDate);/地点SqlParameter paramPlace= new SqlParameter(Place,SqlDbType.NVarChar,500);paramPlace.Value=tbxplace.Text;objcmd.Parameters.Add(paramPlace);objcmd.Connection.Open();objcmd.ExecuteNonQuery();objcmd.Connection.Close(); Response.Redirect(Default.aspx);using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Data.SqlClient;using System.Configuration;namespace OfficeOnline/ / Advice 的摘要说明。/ public class Advice : System.Web.UI.Pageprotected System.Web.UI.WebControls.ImageButton ImageButton1;protected System.Web.UI.WebControls.DataGrid dgdadvice;protected System.Web.UI.WebControls.ImageButton ImageButton2;private void Page_Load(object sender, System.EventArgs e)if (!IsPostBack)/创建数据库连接和命令对象SqlConnection objconn = new SqlConnection(ConfigurationSettings.AppSettingsconnstr);objconn.Open();string objsql=Select * from Advice;SqlDataAdapter da = new SqlDataAdapter(objsql,objconn);/创建并填充DataSetDataSet ds = new DataSet();da.Fill(ds); dgdadvice.DataSource=ds;dgdadvice.DataBind();objconn.Close();#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);this.ImageButton2.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton2_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e)Response.Redirect(AddAdvice.aspx);private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)Response.Redirect(Default.aspx);using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;namespace OfficeOnline/ / AdviceDetail 的摘要说明。/ public class AdviceDetail : System.Web.UI.Pageprotected System.Web.UI.WebControls.TextBox tbxcontent;protected System.Web.UI.WebControls.TextBox tbxtitle;protected System.Web.UI.WebControls.TextBox tbxempname;protected System.Web.UI.WebControls.ImageButton ImageButton1;private void Page_Load(object sender, System.EventArgs e)/ 在此处放置用户代码以初始化页面#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)Response.Redirect(Advice.aspx);using System.Reflection;using System.Runtime.CompilerServices;/ 有关程序集的常规信息是通过下列/ 属性集控制的。更改这些属性值可修改与程序集/ 关联的信息。/assembly: AssemblyTitle()assembly: AssemblyDescription()assembly: AssemblyConfiguration()assembly: AssemblyCompany()assembly: AssemblyProduct()assembly: AssemblyCopyright()assembly: AssemblyTrademark()assembly: AssemblyCulture()/ 程序集的版本信息由下列4 个值组成:/ 主版本/ 次版本/ 内部版本号/ 修订号/ 您可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,方法是按/ 如下所示使用*:assembly: AssemblyVersion(1.0.*)/ 要对程序集进行签名,必须指定要使用的密钥。有关程序集签名的更多信息,请参考/ Microsoft .NET Framework 文档。/ 使用下面的属性控制用于签名的密钥。/ 注意: / (*) 如果未指定密钥,则程序集不会被签名。/ (*) KeyName 是指已经安装在/ 计算机上的加密服务提供程序(CSP)中的密钥。KeyFile 是指包含/ 密钥的文件。/ (*) 如果KeyFile 和KeyName 值都已指定,则/ 发生下面的处理: / (1) 如果在CSP 中可以找到KeyName,则使用该密钥。/ (2) 如果KeyName 不存在而KeyFile 存在,则/ KeyFile 中的密钥安装到CSP 中并且使用该密钥。/ (*) 要创建KeyFile,可以使用sn.exe(强名称)实用工具。/ 在指定KeyFile 时,KeyFile 的位置应该/ 相对于“项目输出目录”。项目输出/ 目录的位置取决于您是在使用本地项目还是Web 项目。/ 对于本地项目,项目输出目录定义为/ obj。例如,如果KeyFile 位于该/ 项目目录中,应将AssemblyKeyFile / 属性指定为assembly: AssemblyKeyFile(.mykey.snk)/ 对于Web 项目,项目输出目录定义为/ %HOMEPATH%VSWebCacheobj。/ (*) “延迟签名”是一个高级选项- 有关它的更多信息,请参阅Microsoft .NET Framework/ 文档。/assembly: AssemblyDelaySign(false)assembly: AssemblyKeyFile()assembly: AssemblyKeyName()using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Data.SqlClient;using System.Configuration;namespace OfficeOnline/ / BulAdd 的摘要说明。/ public class BulAdd : System.Web.UI.Pageprotected System.Web.UI.WebControls.TextBox tbxtitle;protected System.Web.UI.WebControls.TextBox tbxcontent;protected System.Web.UI.WebControls.ImageButton ibnmod;private void Page_Load(object sender, System.EventArgs e)/ 在此处放置用户代码以初始化页面#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.ibnmod.Click += new System.Web.UI.ImageClickEventHandler(this.ibnmod_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void ibnmod_Click(object sender, System.Web.UI.ImageClickEventArgs e)/ 创建数据库连接对象SqlConnection objconn=new SqlConnection(ConfigurationSettings.AppSettingsconnstr);objconn.Open();SqlCommand objcmd=new SqlCommand(BlnAdd,objconn);objcmd.CommandType=CommandType.StoredProcedure; SqlParameter paramTitle = new SqlParameter(Title,SqlDbType.NVarChar,50);paramTitle.Value=tbxtitle.Text;objcmd.Parameters.Add(paramTitle);SqlParameter paramContent=new SqlParameter(Content,SqlDbType.NVarChar,4000);paramContent.Value=tbxcontent.Text;objcmd.Parameters.Add(paramContent);objcmd.ExecuteNonQuery();objconn.Close();Response.Redirect(BlnManage.aspx);using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Data.SqlClient;using System.Configuration;namespace OfficeOnline/ / BlnManage 的摘要说明。/ public class BlnManage : System.Web.UI.Pageprotected System.Web.UI.WebControls.ImageButton ImageButton1;protected System.Web.UI.WebControls.ImageButton ImageButton2;protected System.Web.UI.WebControls.DataGrid dgdbulletin;private void Page_Load(object sender, System.EventArgs e)if (!IsPostBack)BindGrid();public void BindGrid()/创建数据库连接和命令对象SqlConnection objconn = new SqlConnection(ConfigurationSettings.AppSettingsconnstr);objconn.Open();string objsql=Select * from Bulletin;SqlDataAdapter da = new SqlDataAdapter(objsql,objconn);/创建并填充DataSetDataSet ds = new DataSet();da.Fill(ds); dgdbulletin.DataSource=ds;dgdbulletin.DataBind();objconn.Close();#region Web 窗体设计器生成的代码override protected void OnInit(EventArgs e)/ CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。/InitializeComponent();base.OnInit(e);/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() this.dgdbulletin.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgdbulletin_DeleteCommand);this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);this.ImageButton2.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton2_Click);this.Load += new System.EventHandler(this.Page_Load);#endregionprivate void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)Response.Redirect(Default.aspx);private void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e)Response.Redirect(BlnAdd.aspx);private void dgdbulletin_DeleteCommand(object source, System.Web.UI.WebControls.

温馨提示

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

评论

0/150

提交评论