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("选择项目级别", "")); //删除 if (Request.QueryString["limit"] == "del") { string ids = Request.QueryString["id"].ToString(); int count = WebCommon.Public.DataTableDel("tbl_Project", "id in(" + ids + ")"); if (count > 0) { WebCommon.Script.Redirect(WebCommon.Public.GetFromUrl()); } else { WebCommon.Script.AlertAndGoBack("删除失败!"); } } //绑定列表 Bind(); } }
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("选择负责人", "")); } }
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(); } }