using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using Ajax; public partial class UserAccount : CommonPage { //创建一个共用的角色bll Maticsoft.BLL.nr_z_yhjs juesebll = new Maticsoft.BLL.nr_z_yhjs(); //创建一个操作记录模板 Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi(); //创建一个操作记录bll Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi(); Maticsoft.Model.nr_z_yhjs jsmd = new Maticsoft.Model.nr_z_yhjs(); protected void Page_Load(object sender, EventArgs e) { Utility.RegisterTypeForAjax(typeof(UserAccount)); if (!IsPostBack) { if (Session["user"] == null) { Response.Redirect("../index.aspx"); } //获取角色权限 Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); getbd(); pdquanxian(user.juese); } } private void getbd() { DataSet rzds = DBHlper.Execute("select * from dbo.nr_z_yhjs"); if (rzds != null) { juese.DataSource = rzds.Tables[0].DefaultView; juese.DataValueField = "mingcheng"; juese.DataTextField = "mingcheng"; juese.DataBind(); juese.Items.Insert(0, new ListItem("全部", "")); } } #region 敏感权限查看 void pdquanxian(int juese) { Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); if (DBHlper.getzt(user.id) != 1) { Response.Redirect("../index.aspx"); } if (DBHlper.GetPermission(juese, "系统用户", "nr_z_yhzh", "查看全部") == false) { Response.Redirect("../Common/nopower.htm"); } if (DBHlper.GetPermission(juese, "系统用户", "nr_z_yhzh", "添加")) { bt_add.Visible = true; } } #endregion protected void cxrz_Click(object sender, EventArgs e) { string rzjgst = " "; DataSet rizhids = DBHlper.Execute(" select* from view_nr_z_yhzh where " + cxlx.SelectedValue + " like '%" + yhmc.Text + "%' and isqiyong like'%" + zhzt.SelectedValue + "%'and juese like'%" + juese.Text + "%'"); if (rizhids != null && rizhids.Tables[0].Rows.Count > 0) { foreach (DataRow r in rizhids.Tables[0].Rows) { rzjgst += ""; } } else { rzjgst += ""; } rzjgst += "
" + r["zhanghao"] + "" + r["juese"] + "" + r["isqiyong"] + "      点击设置
没有找到相关的操作日志
"; div_main.InnerHtml = rzjgst; } }