Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //专业类别
         ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
         ProjectTypes.DataTextField  = "ClassName";
         ProjectTypes.DataValueField = "ClassName";
         ProjectTypes.DataBind();
         ProjectTypes.Items.Insert(0, new ListItem("选择类型", ""));
         //级别
         ProjectLevel.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(58);
         ProjectLevel.DataTextField  = "ClassName";
         ProjectLevel.DataValueField = "ClassName";
         ProjectLevel.DataBind();
         ProjectLevel.Items.Insert(0, new ListItem("选择级别", ""));
         //部门
         Depart.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(52);
         Depart.DataTextField  = "ClassName";
         Depart.DataValueField = "ClassName";
         Depart.DataBind();
         Depart.Items.Insert(0, new ListItem("选择部门", ""));
         ProjectManager.Items.Insert(0, new ListItem("选择负责人", ""));
     }
 }
Пример #2
0
        protected void Depart_PreRend(object sender, EventArgs e)
        {
            DBContext dBContext = new DBContext();

            Depart.DataSource = (from d in dBContext.Departements select d.NomDep).ToList();
            Depart.DataBind();
        }
Пример #3
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);
                }

                //专业类别
                ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectTypes.DataTextField  = "ClassName";
                ProjectTypes.DataValueField = "ClassName";
                ProjectTypes.DataBind();
                //级别
                ProjectLevel.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(58);
                ProjectLevel.DataTextField  = "ClassName";
                ProjectLevel.DataValueField = "ClassName";
                ProjectLevel.DataBind();
                //部门
                Depart.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(52);
                Depart.DataTextField  = "ClassName";
                Depart.DataValueField = "ClassName";
                Depart.DataBind();
                Depart.Items.Insert(0, new ListItem("选择部门", ""));

                Bind();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Depart.DataSource = (from d in dB.Departements select d.NomDep).ToList();
     Depart.DataBind();
 }