forums_category_input.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;
namespace WhiteForum.forums
{
/// <summary>
/// forums_category_input 的摘要说明。
/// </summary>
public class forums_category_input : BDStudioBase.FormBase
{
protected System.Web.UI.WebControls.Label Label02;
protected System.Web.UI.WebControls.Label Out_Label1;
protected System.Web.UI.WebControls.TextBox In_TextBox1;
protected System.Web.UI.WebControls.Label Out_Label2;
protected System.Web.UI.WebControls.Label Out_Label3;
protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
protected System.Web.UI.WebControls.TextBox In_TextBox3;
protected System.Web.UI.WebControls.Button cbSaveReturn;
protected System.Web.UI.WebControls.Button cbSaveRun;
protected System.Web.UI.WebControls.Button cbSaveSearch;
protected System.Web.UI.WebControls.Button cbReturn;
protected System.Web.UI.WebControls.Label labMessage1;
protected System.Web.UI.WebControls.TextBox In_TextBox2;
protected System.Web.UI.WebControls.TextBox In_TextBox4;
protected System.Web.UI.WebControls.DataGrid DataGrid1;
private string m_num="50";
private COM_ForumCategory COM_ForumCategory=new COM_ForumCategory();
private void Page_Load(object sender, System.EventArgs e)
{
/*定义窗体变量,根据设计报告改变*/
this.o_str_FormName = "forums_category_input";
this.o_str_FormUrl = "forums_category_input.aspx";
this.o_str_DisplayFile1 = "forums_category_display.aspx";
if(!Page.IsPostBack)
{
//填充标签内容
this.Out_label(m_num,"InputFace",this);
}
// DataSet ds=(DataSet)Application["user_parent"];
// this.DataGrid1.DataSource=ds;
// this.DataGrid1.DataBind();
}
#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.cbSaveReturn.Click += new System.EventHandler(this.cbSaveReturn_Click);
this.cbSaveRun.Click += new System.EventHandler(this.cbSaveRun_Click);
this.cbSaveSearch.Click += new System.EventHandler(this.cbSaveSearch_Click);
this.cbReturn.Click += new System.EventHandler(this.cbReturn_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void DataSave(string InsertType)
{
DataSet dsData=this.SetFaceDataToDataSet(m_num,"InputFace",this);
// this.DataGrid1.DataSource=dsData;
// this.DataGrid1.DataBind();
string sReturn=string.Empty;
this.COM_ForumCategory.InsertData(dsData,InsertType,ref sReturn);
this.labMessage1.Text=sReturn;
}
private void cbSaveReturn_Click(object sender, System.EventArgs e)
{
this.DataSave("0");
if (this.labMessage1.Text == "增加成功")
{
this.ReturnToParent(this.o_str_FormName);
}
}
private void cbReturn_Click(object sender, System.EventArgs e)
{
this.ReturnToParent(this.o_str_FormName);
}
private void cbSaveRun_Click(object sender, System.EventArgs e)
{
this.DataSave("0");
}
private void cbSaveSearch_Click(object sender, System.EventArgs e)
{
this.DataSave("1");
if (this.labMessage1.Text != "增加失败")
{
this.Param_Open("forums_category_display");
this.Param_set("as_pk",this.labMessage1.Text);
this.Param_set("as_sendid","W");
this.CreatUserLogParentWindow("forums_category_display",this.o_str_FormUrl);//建立子窗口的父窗口数据值
Response.Redirect(this.o_str_DisplayFile1);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -