您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->网上办公系统源码>>CompanyDecision/CD_Edit.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:网上办公系统源码


当前文件路径:OfficeOnline/CompanyDecision/CD_Edit.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11 12public partial class CompanyDecision_CD_Edit : System.Web.UI.Page 13{ 14 WebService webService = new WebService(); 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 if (Session["UserID"] == null || Session["UserLevel"] == null) 18 { 19 Response.Redirect("~/Error.aspx"); 20 } 21 if (Session["UserLevel"].ToString() != "总经理" && Session["UserLevel"].ToString() != "副总经理") 22 { 23 Response.Redirect("~/Error.aspx"); 24 } 25 if (!Page.IsPostBack) 26 { 27 if (Session["UserLevel"].ToString() != "总经理") 28 { 29 this.CheckBox1.Visible = false; 30 this.lblMsg.Text = "您所撰写的新决策不能立即实行,将等待总经理的审核!"; 31 } 32 string strID = Request.QueryString["cdid"]; 33 string strSql = "SELECT CD_ID,CD_Title,CD_Content,CD_AddPersonID from z_CompanyDecision where CD_ID='" + strID + "';"; 34 DataTable table = webService.ExcuteSelect(strSql); 35 this.tbTitle.Text = table.Rows[0]["CD_Title"].ToString(); 36 this.tbContent.Text = table.Rows[0]["CD_Content"].ToString(); 37 if (Session["UserID"].ToString() != table.Rows[0]["CD_AddPersonID"].ToString()) 38 { 39 Response.Redirect("~/Error.aspx"); 40 } 41 } 42 } 43 protected void btnSubmit_Click(object sender, EventArgs e) 44 { 45 string strSql; 46 if (this.tbTitle.Text == "" || this.tbContent.Text == "") 47 { 48 this.lblMsg.Text = "请填写完整的信息!"; 49 } 50 else 51 { 52 string strTitle = this.tbTitle.Text; 53 string strContent = this.tbContent.Text; 54 if (this.CheckBox1.Checked) 55 { 56 strSql = "Update z_CompanyDecision set CD_Title='" + strTitle + "',CD_Content='" + strContent + "',CD_IsConfirm='1',CD_ConfirmDate='" + DateTime.Now + "',CD_AddDate='" + DateTime.Now + "' where CD_ID='" + Request.QueryString["cdid"] + "';"; 57 } 58 else 59 strSql = "Update z_CompanyDecision set CD_Title='" + strTitle + "',CD_Content='" + strContent + "',CD_AddDate='" + DateTime.Now + "' where CD_ID='" + Request.QueryString["cdid"] + "';"; 60 webService.ExcuteSql(strSql); 61 Response.Redirect("CD_List3.aspx"); 62 } 63 } 64 protected void Button1_Click(object sender, EventArgs e) 65 { 66 string strSql = "Delete from z_CompanyDecision where CD_ID='" + Request.QueryString["cdid"] + "';"; 67 webService.ExcuteSql(strSql); 68 Response.Redirect("CD_List3.aspx"); 69 } 70} 71
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:网上办公系统源码

- 彬彬Asp.net2.0留言板(Vs200..

- 自由游戏币交易下单系统源码

- XproerBBS3.0.107源码(Access)

- KissSite多功能博客V1.9

- Discuz!NT2.0源码

- 漂亮无限级分类源代码(三层..

- GridView自定义分页及可拖动..

- 精美的WEB在线文件管理(狐狸..

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号