?? kmsz_mod.aspx.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 + -