Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //设置只读权限
         if (Request.QueryString["type"] == "read")
         {
             btn_submit.Visible = false;
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "$(function(){$('input').attr('readonly', 'readonly');$('select').attr('disabled', 'true');$('textarea').attr('readonly', 'readonly');});", true);
         }
         //角色
         LimitID.DataSource     = WebBLL.Tbl_LimitManager.GetTbl_LimitAll();
         LimitID.DataTextField  = "LimitName";
         LimitID.DataValueField = "LimitName";
         LimitID.DataBind();
         LimitID.Items.Insert(0, new ListItem("选择角色", ""));
         //部门
         U_DepartID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(52);
         U_DepartID.DataTextField  = "ClassName";
         U_DepartID.DataValueField = "ClassName";
         U_DepartID.DataBind();
         U_DepartID.Items.Insert(0, new ListItem("选择部门", ""));
         //职位
         U_JobID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(54);
         U_JobID.DataTextField  = "ClassName";
         U_JobID.DataValueField = "ClassName";
         U_JobID.DataBind();
         U_JobID.Items.Insert(0, new ListItem("选择职位", ""));
         //职级
         U_JobRank.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(215);
         U_JobRank.DataTextField  = "ClassName";
         U_JobRank.DataValueField = "ClassName";
         U_JobRank.DataBind();
         U_JobRank.Items.Insert(0, new ListItem("选择职级", ""));
         //职称
         U_JobTitle.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(220);
         U_JobTitle.DataTextField  = "ClassName";
         U_JobTitle.DataValueField = "ClassName";
         U_JobTitle.DataBind();
         U_JobTitle.Items.Insert(0, new ListItem("选择职称", ""));
         //专业
         U_Specialty.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
         U_Specialty.DataTextField  = "ClassName";
         U_Specialty.DataValueField = "ClassName";
         U_Specialty.DataBind();
         //U_Specialty.Items.Insert(0, new ListItem("选择专业", ""));
         ReadValue();
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //角色
         LimitID.DataSource     = WebBLL.Tbl_LimitManager.GetTbl_LimitAll();
         LimitID.DataTextField  = "LimitName";
         LimitID.DataValueField = "LimitName";
         LimitID.DataBind();
         LimitID.Items.Insert(0, new ListItem("选择角色", ""));
         //部门
         U_DepartID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(52);
         U_DepartID.DataTextField  = "ClassName";
         U_DepartID.DataValueField = "ClassName";
         U_DepartID.DataBind();
         U_DepartID.Items.Insert(0, new ListItem("选择部门", ""));
         //职位
         U_JobID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(54);
         U_JobID.DataTextField  = "ClassName";
         U_JobID.DataValueField = "ClassName";
         U_JobID.DataBind();
         U_JobID.Items.Insert(0, new ListItem("选择职位", ""));
         //职级
         U_JobRank.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(215);
         U_JobRank.DataTextField  = "ClassName";
         U_JobRank.DataValueField = "ClassName";
         U_JobRank.DataBind();
         U_JobRank.Items.Insert(0, new ListItem("选择职级", ""));
         //职称
         U_JobTitle.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(220);
         U_JobTitle.DataTextField  = "ClassName";
         U_JobTitle.DataValueField = "ClassName";
         U_JobTitle.DataBind();
         U_JobTitle.Items.Insert(0, new ListItem("选择职称", ""));
         //专业
         U_Specialty.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
         U_Specialty.DataTextField  = "ClassName";
         U_Specialty.DataValueField = "ClassName";
         U_Specialty.DataBind();
         //U_Specialty.Items.Insert(0, new ListItem("选择专业", ""));
     }
 }