protected void bindNewsCol() { int role_id = Convert.ToInt32(Session[Constant.roleID].ToString()); AUTO.BLL.YouthNewsColBLL bll = new BLL.YouthNewsColBLL(); DataSet ds = null; switch (role_id) { case 1: //站长 ds = bll.GetNewsColList(""); break; case 2: //超级管理员 ds = bll.GetNewsColList(""); break; case 3: //高级管理员——内部编辑 //ds = bll.GetNewsColList(" news_column_id >5 and news_column_id<8 "); ds = bll.GetNewsColList(" news_column_id >5 "); break; case 4: //学院账号 //ds = bll.GetNewsColList(" news_column_id >2 and news_column_id<6 "); ds = bll.GetNewsColList(" news_column_id >2 and news_column_id<6 "); break; } ddlNewsCol.DataValueField = "news_column_id"; ddlNewsCol.DataTextField = "news_column_name"; ddlNewsCol.DataSource = ds; ddlNewsCol.DataBind(); ddlNewsCol.Items.Insert(0, new ListItem("", "0")); }
//是否能够修改[修改意见] protected void bindRevise() { int role_id = Convert.ToInt32(Session[Constant.roleID].ToString()); AUTO.BLL.YouthNewsColBLL bll = new BLL.YouthNewsColBLL(); if (role_id == 3 || role_id == 4 || role_id == 5) { txt_revise.Enabled = false; } }
protected void bindNewsCol() { int role_id = Convert.ToInt32(Session[Constant.roleID].ToString()); AUTO.BLL.YouthNewsColBLL bll = new BLL.YouthNewsColBLL(); DataSet ds = null; switch (role_id) { case 1: //站长 ds = bll.GetNewsColList(""); break; case 2: //超级管理员 ds = bll.GetNewsColList(""); break; case 3: //高级管理员——内部编辑 //ds = bll.GetNewsColList(" news_column_id >5 and news_column_id<8 "); ds = bll.GetNewsColList(""); break; case 4: //实习编辑 //ds = bll.GetNewsColList(" news_column_id >5 and news_column_id<8 "); ds = bll.GetNewsColList(""); break; case 5: //学院账号 //ds = bll.GetNewsColList(" news_column_id >2 and news_column_id<6 "); ds = bll.GetNewsColList(" news_column_id >2 and news_column_id<6 "); break; break; } DataTable dtSource = ds.Tables[0]; DataRow newRow = dtSource.NewRow(); newRow["news_column_id"] = "-1"; newRow["news_column_name"] = "请选择类型"; dtSource.Rows.InsertAt(newRow, 0); ddlNewsCol.DataValueField = "news_column_id"; ddlNewsCol.DataTextField = "news_column_name"; ddlNewsCol.DataSource = dtSource; ddlNewsCol.DataBind(); }