📄 kjnd_add.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 Com.Ascs.Plp.CW;
using com.ascs.plp.publics;
namespace Com.Ascs.Plp.CWZZ
{
/// <summary>
/// KJND_ADD 的摘要说明。
/// </summary>
public class KJND_ADD : com.unicafe.ui.UnicafePage
{
protected System.Web.UI.WebControls.LinkButton LinkButton1;
protected System.Web.UI.WebControls.TextBox TextBox1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
this.VerifyPage();
if(!this.IsPostBack)
{
this.VerifyPage("zt_kjnd_mgr");
}
}
#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.LinkButton1.Click += new System.EventHandler(this.LinkButton1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void LinkButton1_Click(object sender, System.EventArgs e)
{
Com.Ascs.Plp.CW.CW_KJND thisKJND = new CW_KJND();
Com.Ascs.Plp.CW.CW_KJNDMgr thisKJNDMgr = new CW_KJNDMgr();
//获取关键字并给结转损益设置对象的各属性赋值
thisKJND.KJND = TextBox1.Text; //会计年度
//检查是否主关键字重复
if(thisKJNDMgr.GetCW_KJND(thisKJND.KJND) != null)
{
Prompt.PromptAlert(this,"该会计年度已经存在!");
return;
}
//执行修改操作,失败则给出错误提示
if (thisKJNDMgr.AddCW_KJND(thisKJND) == false)
{
Prompt.PromptError(this,"新增会计年度时产生错误。");
return;
}
else
{
//关闭窗口,返回父页面
CommonService.Return(this);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -