public void BindData() { if (!base.UserPrincipal.HasPermissionID(base.GetPermidByActID(this.Act_SetPerData)) && (base.GetPermidByActID(this.Act_SetPerData) != -1)) { this.gridView.Columns[1].Visible = false; } if (!base.UserPrincipal.HasPermissionID(base.GetPermidByActID(this.Act_UpdateData)) && (base.GetPermidByActID(this.Act_UpdateData) != -1)) { this.gridView.Columns[7].Visible = false; } if (!base.UserPrincipal.HasPermissionID(base.GetPermidByActID(this.Act_DelData)) && (base.GetPermidByActID(this.Act_DelData) != -1)) { this.gridView.Columns[8].Visible = false; } DataSet usersByType = new DataSet(); string selectedValue = this.DropUserType.SelectedValue; string key = ""; if (this.txtKeyword.Text.Trim() != "") { key = this.txtKeyword.Text.Trim(); } User user = new User(); if (selectedValue != "") { usersByType = user.GetUsersByType(selectedValue, key); } else { usersByType = user.GetUserList(key); } this.gridView.DataSetSource = usersByType; }
public void BindData() { DataSet ds = new DataSet(); string usertype = DropUserType.SelectedValue; string keyword = ""; if (txtKeyword.Text.Trim() != "") { keyword = txtKeyword.Text.Trim(); } User userAdmin = new User(); if (usertype != "") { ds = userAdmin.GetUsersByType(usertype, keyword); } else { ds = userAdmin.GetUserList(keyword); } gridView.DataSetSource = ds; }
public void BindData() { DataSet usersByType = new DataSet(); string selectedValue = this.DropUserType.SelectedValue; string key = ""; if (this.txtKeyword.Text.Trim() != "") { key = this.txtKeyword.Text.Trim(); } User user = new User(); if (selectedValue != "") { usersByType = user.GetUsersByType(selectedValue, key); } else { usersByType = user.GetUserList(key); } this.gridView.DataSetSource = usersByType; }
private void LoadUsers() { User userAdmin = new User(); DataSet ds = userAdmin.GetUsersByType("UU", ""); if (ds.Tables.Count != 0 && ds.Tables[0].Rows.Count != 0 && ds.Tables[0].Columns.Count != 0) { this.ddlUserID.DataSource = ds.Tables[0]; this.ddlUserID.DataTextField = "UserName"; this.ddlUserID.DataValueField = "UserID"; this.ddlUserID.DataBind(); this.ddlUserID.Items.Insert(0, new ListItem("请选择", "0")); } }