public string GetMenusTitle(Guid id) { if (id == Guid.Empty) { return("一级菜单"); } var data = sms.GetSystemMenus(id); return(data.SystemMenus_Title); }
public void Bind() { Guid id = Request.Params["action"] == null ? Guid.Empty : Guid.Parse(Request.Params["action"]); if (id == Guid.Empty) { Response.Write("<script>alert('数据丢失,请重试';location.href='SystemMenus_List.aspx'</script>"); } var data = smSvc.GetSystemMenus(id); this.HiddenField1.Value = data.SystemMenus_Id.ToString(); this.txtName.Text = data.SystemMenus_Title; this.txtLink.Text = data.SystemMenus_Link; this.txtIcon.Text = data.SystemMenus_Icon; if (data.SystemMenus_ParentId != Guid.Empty) { var parentData = smSvc.GetSystemMenus(data.SystemMenus_ParentId); if (parentData.SystemMenus_ParentId == Guid.Empty) { this.ddlFirst.SelectedValue = "2"; this.ddlSecond.Style.Add("display", "block"); var parentdatas = smSvc.GetSystemMenusByParentId(Guid.Empty); this.ddlSecond.DataSource = parentdatas; this.ddlSecond.DataTextField = "SystemMenus_Title"; this.ddlSecond.DataValueField = "SystemMenus_Id"; this.ddlSecond.DataBind(); this.ddlSecond.SelectedValue = parentData.SystemMenus_Id.ToString(); } else { this.ddlFirst.SelectedValue = "3"; } } }
public string GetMenuTitle(Guid menuid) { var data = smSvc.GetSystemMenus(menuid); return(data.SystemMenus_Title); }