- using System;
- using System.Data;
- using qminoa.BLL;
- namespace qminoa.Webs.MR
- {
- public class EmpPhoto : qminoa.Webs.PageBase
- {
- protected System.Web.UI.WebControls.DropDownList dropBranch;
- protected System.Web.UI.WebControls.DropDownList dropDep;
- protected System.Web.UI.WebControls.TextBox txtName;
- protected System.Web.UI.WebControls.ImageButton cmdQuery;
- protected System.Web.UI.WebControls.DataGrid dgdData;
- private void Page_Load(object sender, System.EventArgs e)
- {
- this.PageBegin("人员照片",true);
- if(!Page.IsPostBack)
- {
- DataBind();
- }
- }
- public DataTable EmpPhotoTB
- {
- get
- {
- string[] array = new string[3];
- array[0] = dropBranch.SelectedItem.Value;
- array[1] = dropDep.SelectedItem.Value;
- array[2] = txtName.Text;
- DataTable empTB = (new EmpSystem()).GetEmpPhotoTB_By_QueryStr(array[0],array[1],array[2]);
- return empTB ;
- }
- }
- public DataTable BraTB
- {
- get
- {
- return (new DepSystem()).GetBraTB();
- }
- }
- public DataTable DepTB
- {
- get
- {
- int branchID = Convert.ToInt32(dropBranch.SelectedItem.Value,10);
- return (new DepSystem()).GetDepTB_By_BranchID(branchID);
- }
- }
- #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.dropBranch.SelectedIndexChanged += new System.EventHandler(this.dropBranch_SelectedIndexChanged);
- this.dropDep.SelectedIndexChanged += new System.EventHandler(this.dropDep_SelectedIndexChanged);
- this.cmdQuery.Click += new System.Web.UI.ImageClickEventHandler(this.cmdQuery_Click);
- this.dgdData.PageIndexChanged += new System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.dgdData_PageIndexChanged);
- this.Load += new System.EventHandler(this.Page_Load);
- }
- #endregion
- private void dgdData_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
- {
- dgdData.CurrentPageIndex=e.NewPageIndex;
- dgdData.DataBind();
- }
- private void cmdQuery_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- dgdData.DataBind();
- }
- private void dropBranch_SelectedIndexChanged(object sender, System.EventArgs e)
- {
- dropDep.DataBind();
- dgdData.DataBind();
- }
- private void dropDep_SelectedIndexChanged(object sender, System.EventArgs e)
- {
- dgdData.DataBind();
- }
- }
- }