📄 add_position.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class add_positison : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["uname"].ToString() != null && Session["role"].ToString() == "1")
{
if (!IsPostBack)
{
position p = new position();
this.drop_department.DataSource = p.band_department();
drop_department.DataTextField = "d_name";
drop_department.DataValueField = "d_id";
drop_department.DataBind();
}
}
}
protected void btn_add_Click(object sender, EventArgs e)
{
ArrayList arr = new ArrayList();
arr.Add(this.tpositionName.Text.Trim().ToString());
arr.Add(this.drop_department.SelectedValue.ToString());
arr.Add(this.tcontent.Text.Trim().ToString());
position p = new position();
p.AddPosition(arr);
this.tpositionName.Text = string.Empty;
Response.Write("<script>alert('添加成功!')</script>");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -