QueryUser.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:2k
源码类别:
OA系统
开发平台:
C#
- 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;
- namespace OThinker.H3.Portal
- {
- public partial class QueryUser : PortalPage
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (this.IsPostBack)
- {
- this.lnkSearch_Click(this, new EventArgs());
- }
- }
- protected void lnkSearch_Click(object sender, EventArgs e)
- {
- if (this.txtKeyword.Text == null || this.txtKeyword.Text.Trim() == "")
- {
- this.NotifyMessage("请输入要查找的关键字");
- }
- System.Data.DataTable table = OThinker.H3.Server.Engine.Organization.QueryUser(this.txtKeyword.Text);
- if (table.Rows.Count == 0)
- {
- this.lblResult.Text = "没有找到符合条件的用户";
- }
- else
- {
- this.lblResult.Text = null;
- }
- this.UserGrid.DataSource = table;
- this.UserGrid.DataBind();
- }
- protected void UserGrid_RowDataBound(object sender, GridViewRowEventArgs e)
- {
- if (e.Row.RowType == DataControlRowType.DataRow)
- {
- string id = e.Row.Cells[0].Text;
- HyperLink link = new HyperLink();
- link.NavigateUrl = PageName_EditUser + "?" + Param_ID + "=" + id;
- link.Text = "打开";
- e.Row.Cells[0].Controls.Add(link);
- }
- }
- }
- }