⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kmsz_mod.aspx.cs

📁 ASP.NET的一些开发实例,有论坛管理系统等
💻 CS
字号:
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 com.unicafe.ui;
using com.unicafe.common;
using com.unicafe.security;
using com.ascs.plp.common;
using com.ascs.plp.publics;
using Com.Ascs.Plp.CW;

namespace PLP.CWZZ.KMSZ
{
	/// <summary>
	/// kmsz_mod 的摘要说明。
	/// </summary>
	public class kmsz_mod :com.unicafe.ui.UnicafePage
	{
		protected System.Web.UI.WebControls.LinkButton LB_mod;
		protected int i_kmjb;
		protected int i_kmcd;
		protected Com.Ascs.Plp.CW.CW_KJKMJB CW_KJKMJB= new Com.Ascs.Plp.CW.CW_KJKMJB();
		protected System.Web.UI.WebControls.LinkButton datacheck;
		SqlConnection cn = new SqlConnection (com.unicafe.common.Configuration.GetDBConnectionString());
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化
			if(!this.IsPostBack)  //判断第一次显示
			{
				i_kmjb = int.Parse(Request.QueryString["kmjb"].ToString());

				Com.Ascs.Plp.CW.CW_KJKMJBMgr  CW_KJKMJBMgr = new Com.Ascs.Plp.CW.CW_KJKMJBMgr();
				
				CW_KJKMJB = CW_KJKMJBMgr.GetCW_KJKMJB(i_kmjb);  //初始化数据
				

			}

		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.datacheck.Click += new System.EventHandler(this.LB_mod_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void LB_mod_Click(object sender, System.EventArgs e)
		{
			
			//如果在会计科目表中队员的会计级别有科目则不能修改


			//。。。。。


			try
			{
				CW_KJKMJB.KMJB = int.Parse(Request.Form["kmjb"].ToString());
				CW_KJKMJB.CD = int.Parse(Request.Form["kmcd"].ToString());
			
				Com.Ascs.Plp.CW.CW_KJKMJBMgr  CW_KJKMJBMgr = new Com.Ascs.Plp.CW.CW_KJKMJBMgr();
		

				cn.Open();
				if(CW_KJKMJBMgr.UpdateCW_KJKMJB(cn,CW_KJKMJB))
				{
					//string ReturnURL = CommonService.CreatReturnURL(this);
					Response.Write("<script language=javascript>window.opener.location='kmsz_view.aspx';window.close();</script>");  
				}
				else
				{
					Response.Write("<script>alert('修改失败');</script>");
		
				}
				cn.Close();
			}
			catch
			{}

			

		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -