protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } MyManager.FillList(DropDownList1, "SELECT TypeName,(Convert(varchar(4),TypeID) + '|' + TypeCode) AS Value FROM [TaskTypes]", "TypeName", "Value", true); }
protected void Page_Load(object sender, EventArgs e) { if (Request["TaskID"] == null || IsPostBack || Session["UserID"] == null) { return; } TaskID = Request["TaskID"].ToString(); if (false == VerifyTask(TaskID)) { TextBox1.Enabled = false; DropDownList1.Enabled = false; Button1.Visible = false; lb.Text = "无权限转出!请关闭窗口!"; return; } MyManager.FillList(DropDownList1, "SELECT CorpName,CorpID From Corps Where CorpType = 1 ", "CorpName", "CorpID", true); }
protected void MyFillListByUserType(String TaskType, String UserType) { if (TaskType == "1") { MyManager.FillList(DropDownList2, "SELECT CorpName,CorpID From Corps Where CorpName='工具房' ", "CorpName", "CorpID", true); return; } if (UserType == "0") { MyManager.FillList(DropDownList2, "SELECT CorpName,CorpID From Corps Where CorpType = 1 ", "CorpName", "CorpID", true); } else if (UserType == "1")//小组长 { MyManager.FillList(DropDownList2, "SELECT CorpName,CorpID From Corps Where CorpType =1 AND ParentID =" + Session["CorpParentID"].ToString(), "CorpName", "CorpID", true); } else { MyManager.FillList(DropDownList2, "SELECT CorpName,CorpID From Corps Where CorpID = " + Session["CorpID"].ToString(), "CorpName", "CorpID", true); } }