sellManage.aspx.cs
(完整代码) 1KBusing 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;
using Salary.DAO;
public partial class sellManage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["adminUserName"] == null)
Response.Redirect("login.aspx");
if (!IsPostBack)
{
this.SellYear.Items.Add(new ListItem("请选择查询年份","0"));
for (int i = 2008; i <= 2030; i++)
this.SellYear.Items.Add(new ListItem(i.ToString(),i.ToString()));
this.SellMonth.Items.Add(new ListItem("请选择查询月份","0"));
for (int i = 1; i <= 12; i++)
this.SellMonth.Items.Add(new ListItem(i.ToString(),i.ToString()));
}
}
protected void Btn_Search_Click(object sender, EventArgs e)
{
string sellYear = this.SellYear.SelectedValue;
string sellMonth = this.SellMonth.SelectedValue;
string employeeId = this.EmployeeId.Text;
SellDAO sellDAO = new SellDAO();
this.GridView1.DataSource = sellDAO.QuerySellInfo(sellYear, sellMonth, employeeId);
this.GridView1.DataSourceID = null;
this.GridView1.PageIndex = 0;
this.GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
string sellYear = this.SellYear.SelectedValue;
string sellMonth = this.SellMonth.SelectedValue;
string employeeId = this.EmployeeId.Text;
SellDAO sellDAO = new SellDAO();
this.GridView1.DataSource = sellDAO.QuerySellInfo(sellYear, sellMonth, employeeId);
this.GridView1.DataSourceID = null;
this.GridView1.PageIndex = e.NewPageIndex;
this.GridView1.DataBind();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。