/// <summary> /// 初始化页面显示 /// </summary> protected void initControls() { /// 获取宿舍楼 if (Request["rid"] == null) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "onekey", "alert('未设置rid!请从查看页面(点击宿舍楼管理根节点)访问本页面!')", true); return; } /// 院信息初始化 tbDid.Items.AddRange(Yid.getYidItem()); /// 获取并显示宿舍信息 DataRow dt = Room.getOne(Request["rid"]); if (dt == null || dt.IsNull(0)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "onekey", "alert('非法访问!')", true); return; } tbDid.SelectedValue = lbDid.Text = dt["院名称"].ToString(); tbName.Text = lbName.Text = dt["宿舍名称"].ToString(); tbInfo.Text = dt["备注"].ToString(); lbBid.Text = dt["宿舍楼名称"].ToString(); /// 获取并显示宿舍楼信息 tbBid.Items.AddRange(Building.getItems()); // 添加到宿舍楼下拉选项 tbBid.Items.FindByText(dt["宿舍楼名称"].ToString()).Selected = true; }
/// <summary> /// 初始化院别 /// </summary> protected void initYid() { tbDid.Items.Add("全部"); tbDid.Items.AddRange(Yid.getYidItem()); initBid(tbDid.SelectedValue); // 初始化楼信息 initR(0, ""); // 显示所有宿舍信息 }
/// <summary> /// 初始化院别 /// </summary> protected void initControls() { tbDid.Items.Add("全部"); tbDid.Items.AddRange(Yid.getYidItem()); tbBid.Items.Add("全部"); tbBid.Items.AddRange(Building.getItems(tbDid.SelectedValue)); }
/// <summary> /// 初始化页面显示 /// </summary> protected void initControls() { if (Request["bid"] == null) { msgBox.Show(this, "未设置bid!请从查看页面(点击宿舍楼管理根节点)访问本页面!"); return; } tbDid.Items.AddRange(Yid.getYidItem()); DataRow dt = Building.getOne(Request["bid"]); if (dt == null || (dt.IsNull(0))) { msgBox.Show(this, "非法访问!"); return; } /// 显示 tbDid.Text = lbDid.Text = dt["院名称"].ToString(); tbBid.Text = dt["宿舍楼编号"].ToString(); tbName.Text = lbName.Text = dt["宿舍楼名称"].ToString(); tbInfo.Text = dt["备注"].ToString(); }
/// <summary> /// 初始化页面显示 /// </summary> protected void initControls() { DataRow dt; if (Request["rid"] == null) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "onekey", "alert('未设置bid!请从查看页面(点击宿舍楼管理根节点)访问本页面!')", true); return; } else { dt = Room.getOne(Request["rid"]); if (dt == null || dt.IsNull(0)) { return; } } tbDid.Items.AddRange(Yid.getYidItem()); /// 显示 tbDid.Text = dt["院名称"].ToString(); tbBid.Text = dt["宿舍楼编号"].ToString(); tbName.Text = dt["宿舍楼名称"].ToString(); }
/// <summary> /// 初始化院信息显示 /// </summary> protected void initControls() { tbDid.Items.Clear(); tbDid.Items.AddRange(Yid.getYidItem()); initB(tbDid.SelectedValue); }
/// <summary> /// 初始化院别List /// </summary> protected void initYidList() { tbDid.Items.Add("全部"); tbDid.Items.AddRange(Yid.getYidItem()); }