📄 kjnd_view.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.publics;
namespace PLP.CWZZ.KJND
{
/// <summary>
/// KJND_VIEW 的摘要说明。
/// </summary>
public class KJND_VIEW : com.unicafe.ui.UnicafePage
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.DataGrid DataGrid1;
protected System.Web.UI.HtmlControls.HtmlForm Form1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.LinkButton LinkButton1;
private void Page_Load(object sender, System.EventArgs e)
{
this.VerifyPage();
if (!this.IsPostBack)
{
this.VerifyPage("zt_kjnd_mgr");
Label1.Text = this.CurrentEmployee.EmplName;
// 给绑定DataGrid控件的SQL语句进行赋值(注意,SQL语句赋值之后不要再修改)
ViewState["sql"] = "Select * From CW_KJND";
string sql = ViewState["sql"].ToString();
//处理DataGrid控件(绑定DataGrid控件 -> 检查是否需要定位 -> 给导航文本赋值)
if(CommonService.HandleDataGrid(this, sql, DataGrid1, "Data", Label2, Label3, Label4) == false)
this.Response.Redirect("../publics/Error.aspx?errmsg=在处理数据时发生错误。");
}
else
{
//检查回发的请求操作是否是要进入上页或下页
if(CommonService.PageNavigate(this, DataGrid1, "Data", Label2, Label3, Label4) == false)
this.Response.Redirect("../publics/Error.aspx?errmsg=在处理数据时发生错误。");
}
}
#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)
{
string[] DataTypes = {"string"};
string[] pk = {"Hidden1"};
//调用删除方法对选中的数据进行删除
CommonService.DelSelectRecord(this,DataGrid1,ViewState["sql"].ToString(),"Data","CheckBox1",DataTypes,pk,"Com.Ascs.Plp.CW.CW_KJNDMgr","DelCW_KJND","某些会计年度已经被使用,不允许删除。");
//对页面导航文本进行重新赋值
CommonService.PageNavigatorText(DataGrid1,Label2, Label3, Label4);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -