protected void 工作计划(object sender, EventArgs e) { ParentID.DataSource = WebBLL.Tbl_ProjectArchiveManager.GetTbl_ProjectArchiveParentName(" ClassName1='" + this.ClassName1.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue) + "and ClassName2='" + this.ClassName2.SelectedValue + "'"); ParentID.DataTextField = "PA_Name"; ParentID.DataValueField = "ID"; ParentID.DataBind(); ParentID.Items.Insert(0, new ListItem("选择卷册", "")); }
private void BindDropDownList() { ArrayList modelList = new ArrayList(); modelList.Add(new Model(Constants.BLANK_LONG_VALUE, SimpleResourceHelper.GetString("SELECT.EMPTY.LABEL"))); modelList.AddRange(this.modelService.FindAllWithExclude(this.Domain.ID)); ParentID.DataSource = modelList; ParentID.DataTextField = "Name"; ParentID.DataValueField = "ID"; ParentID.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ParentID.DataSource = WebBLL.Tbl_ClassManager.GetTbl_ClassByAllParentID(0); ParentID.DataTextField = "ClassName"; ParentID.DataValueField = "ID"; ParentID.DataBind(); ParentID.Items.Insert(0, new ListItem("作为一级分类", "0")); if (Request.QueryString["pid"] != "") { ParentID.SelectedValue = Request.QueryString["pid"]; ParentID.Enabled = false; } } }
protected void PD_Type_SelectedIndexChanged(object sender, EventArgs e) { string type = this.PD_Type.SelectedValue; if (type == "问题修改" || type == "问题重提") { lishitizi.Visible = true; ParentID.DataSource = WebBLL.Tbl_ProjectDocumentManager.GetTbl_ProjectDocumentParent(" ClassName='" + this.ClassName.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue)); ParentID.DataTextField = "PD_Name"; ParentID.DataValueField = "ID"; ParentID.DataBind(); ParentID.Items.Insert(0, "选择提资"); } else { lishitizi.Visible = false; } }
public void ReadValue() { ParentID.DataSource = WebBLL.Tbl_ClassManager.GetTbl_ClassByAllParentID(0); ParentID.DataTextField = "ClassName"; ParentID.DataValueField = "ID"; ParentID.DataBind(); ParentID.Items.Insert(0, new ListItem("作为一级分类", "0")); int pid = WebCommon.Public.ToInt(Request.QueryString["pid"]); if (pid > 0) { ParentID.Enabled = false; } int ID = int.Parse(Request.QueryString["id"].ToString()); WebModels.Tbl_Class tblClass = WebBLL.Tbl_ClassManager.GetTbl_ClassById(ID); this.ClassName.Text = tblClass.ClassName; this.ParentID.Text = tblClass.ParentID.ToString(); this.Remark.Text = tblClass.Remark; this.Status.Text = tblClass.Status; this.OrderNum.Text = tblClass.OrderNum.ToString(); }
protected void ClassName_SelectedIndexChanged(object sender, EventArgs e) { try { //判断该专业是否存在于这个项目 int rows = WebBLL.Tbl_ProjectDesignerManager.GetDataTableByPage(1, 1, "ClassName='" + this.ClassName.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue), "").Rows.Count; if (rows < 1) { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('该项目不存在这个专业!');", true); ClassName.SelectedIndex = 0; return; } //获取这个项目这个专业的提资 ParentID.DataSource = WebBLL.Tbl_ProjectDocumentManager.GetTbl_ProjectDocumentParent(" ClassName='" + this.ClassName.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue)); ParentID.DataTextField = "PD_Name"; ParentID.DataValueField = "ID"; ParentID.DataBind(); ParentID.Items.Insert(0, new ListItem("选择提资", "")); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('请先选择对应项目!');", true); } }