protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindTree(); if (!string.IsNullOrEmpty(Request.QueryString["mCode"])) { string mCode = Request.QueryString["mCode"]; Model.tMenu m = BLL.GetModel(Convert.ToInt32(mCode)); if (m.mFaherId != null) { TreeDpt.SelectedNodeID = m.mFaherId.ToString(); } } } }
protected void LoadData(string mCode) { Model.tMenu m = BLL.GetModel(Convert.ToInt32(mCode)); if (m == null) { Alert.ShowInTop("出错了!"); return; } txtName.Text = m.mName; txtRemark.Text = m.mRemark; if (m.mFaherId == null) { chk.Checked = true; } else { dptFatherId.Text = m.mFaherId.ToString(); txtFather.Text = BLL.GetModel((int)m.mFaherId).mName; } txtSort.Text = m.mSort.ToString(); txtUrl.Text = m.mUrl; drp_tb.SelectedValue = m.mIcon; }