rewardPunish/search.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
namespace Eclipse.HRM.UI.rewardPunish
{
public partial class search : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Insert();
}
private void Insert()
{
string commd;
if (Drop.SelectedIndex == 0) //部门查询(模糊查询)
{
commd = "select * from stafflist A,rd_ph_list B,departmentlist C where A.S_ID=B.S_ID and A.D_ID=C.D_ID and C.D_name like '%" + TxtIpunt.Text + "%' ";
}
else if (Drop.SelectedIndex == 1) //姓名查询
{
commd = "select * from stafflist A,rd_ph_list B,departmentlist C where A.S_ID=B.S_ID and A.D_ID=C.D_ID and A.S_name like '%" + TxtIpunt.Text + "%'";
}
else if (Drop.SelectedIndex == 2)//部门编号
{
commd = "select * from stafflist A,rd_ph_list B,departmentlist C where A.S_ID=B.S_ID and A.D_ID=C.D_ID and C.D_ID='" + TxtIpunt.Text + "'";
}
else//员工编号
{
commd = "select * from stafflist A,rd_ph_list B,departmentlist C where A.S_ID=B.S_ID and A.D_ID=C.D_ID and B.S_ID='" + TxtIpunt.Text + "'";
}
SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=Eclipse_HRM;Persist Security Info=True;User ID=sa;Password=51Aspx");
SqlCommand comm = new SqlCommand(commd, conn);
SqlDataAdapter da = new SqlDataAdapter(comm);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
后面还有 5 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
