ZQManger/AddZhiQin.aspx.cs
(完整代码) 2KBusing 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 FuDaoYuanManger_AddZhiQin : System.Web.UI.Page
{
SqlHelper data = new SqlHelper();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = data.GetDataReader("select * from Dep ");
DropDownList1.DataTextField = "DepName";
DropDownList1.DataValueField = "DepId";
DropDownList1.DataBind();
DropDownList2.DataSource = data.GetDataReader("select * from UserInfo where BMID='" + DropDownList1.SelectedValue + "' and roule='普通员工'");
DropDownList2.DataTextField = "UserTruename";
DropDownList2.DataValueField = "Userid";
DropDownList2.DataBind();
DropDownList4.DataSource = data.GetDataReader("select * from ZQLeiXing ");
DropDownList4.DataTextField = "Name";
DropDownList4.DataValueField = "id";
DropDownList4.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlHelper data = new SqlHelper();
data.RunSql("insert into ZhiQin(ClassId,ClassName,StName,StId,ZQLeiXingName,RiQi,LeiXing,Remark)values('" + DropDownList1.SelectedValue + "','" + DropDownList1.SelectedItem.Text + "','" + DropDownList2.SelectedItem.Text + "','" + DropDownList2.SelectedValue + "','" + DropDownList4.SelectedItem.Text+ "','" + TextBox2.Text + "','" + DropDownList3.SelectedValue + "','" + TextBox3.Text + "' ) ");
Alert.AlertAndRedirect("添加成功", "AddZhiQin.aspx");
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList2.DataSource = data.GetDataReader("select * from UserInfo where BMID='" + DropDownList1.SelectedValue + "' and roule='普通员工'");
DropDownList2.DataTextField = "UserTruename";
DropDownList2.DataValueField = "Userid";
DropDownList2.DataBind();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。