You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

79 lines
2.1 KiB

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq;
using System.Data.Entity;
using FineUI;
using System.Text;
namespace SCP.admin
{
public partial class user_select_title : PageBase
{
#region ViewPower
/// <summary>
/// 本页面的浏览权限,空字符串表示本页面不受权限控制
/// </summary>
public override string ViewPower
{
get
{
return "CoreTitleView";
}
}
#endregion
#region Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
private void LoadData()
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
string ids = GetQueryValue("ids");
// 绑定角色复选框列表
BindDDLRole();
// 初始化角色复选框列表的选择项
cblJobTitle.SelectedValueArray = ids.Split(',');
}
private void BindDDLRole()
{
cblJobTitle.DataTextField = "Name";
cblJobTitle.DataValueField = "ID";
cblJobTitle.DataSource = DB.Titles;
cblJobTitle.DataBind();
}
#endregion
#region Events
//protected void btnSaveClose_Click(object sender, EventArgs e)
//{
// string titleValues = String.Join(",", cblJobTitle.SelectedItemArray.Select(c => c.Value));
// string titleTexts = String.Join(",", cblJobTitle.SelectedItemArray.Select(c => c.Text));
// //PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(titleValues, titleTexts)
// // + ActiveWindow.GetHideReference());
// PageContext.RegisterStartupScript(String.Format("selectTitle({0},{1});", JsHelper.Enquote(titleTexts), JsHelper.Enquote(titleValues)));
//}
#endregion
}
}