public string getstylename(string styleid) { int styid = DataConverter.CLng(styleid); if (styid > 0) { return(sll.Getpagestrylebyid(styid).PageNodeName.ToString()); } else { return("无样式"); } }
protected void Page_Load(object sender, EventArgs e) { B_Admin badmin = new B_Admin(); if (!IsPostBack) { if (!B_ARoleAuth.Check(ZLEnum.Auth.page, "AddPageStyle")) { function.WriteErrMsg("没有权限进行此项操作"); } if (Sid > 0) { M_PageStyle Pagestyle = bll.Getpagestrylebyid(Sid); this.styleName.Text = Pagestyle.PageNodeName.ToString(); stylePath.Text = Pagestyle.StylePath; this.orderid.Text = Pagestyle.Orderid.ToString(); TemplateIndex_hid.Value = Pagestyle.TemplateIndex; TempImg_T.Text = Pagestyle.TemplateIndexPic; } string sname = string.IsNullOrEmpty(styleName.Text) ? "添加黄页样式" : "[" + styleName.Text + "]"; Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='PageManage.aspx'>企业黄页</a></li><li><a href='PageStyle.aspx'>黄页样式管理</a></li><li class='active'>" + sname + "</li>"); } }
protected void Page_Load(object sender, EventArgs e) { if (StyleID < 1) { function.WriteErrMsg("Style参数错误,用户尚未绑定样式"); } if (!IsPostBack) { DPBind(); UserID = DataConverter.CLng(Request.QueryString["UserID"]); if (Menu.Equals("del")) { int did = DataConverter.CLng(Request.QueryString["did"]); if (did > 0) { delnodes(did); } Response.Redirect("PageTemplate.aspx?StyleID=" + StyleID); } //---------------------------------- if (StyleID > 0) { if (!B_ARoleAuth.Check(ZLEnum.Auth.page, "AddPageStyle")) { function.WriteErrMsg("没有权限进行此项操作"); } String styleName = sll.Getpagestrylebyid(StyleID).PageNodeName; StyleName_L.Text = styleName; Label1.Text = "<a href=\"PageStyle.aspx\">黄页样式管理</a> >> <a href=\"PageTemplate.aspx?styleid=" + this.StyleID + "\">样式栏目设置</a> >> " + styleName; addtree.Text = "<a href=\"AddPageTemplate.aspx?styleid=" + StyleID + "\">添加黄页栏目</a>"; } if (Mid > 0) { M_PageReg regMod = regBll.SelReturnModel(Mid); string tablename = regMod.TableName; DataTable temptable = mll.SelectTableName(tablename, "UserName =@uname", new SqlParameter[] { new SqlParameter("uname", regMod.UserName) }); this.tempStyleid = DataConverter.CLng(temptable.Rows[0]["Styleid"]); UserID = regMod.UserID; Label1.Text = "黄页管理 >> <a href=\"PageManage.aspx\">黄页用户列表</a> >> <a href=\"PageTemplate.aspx?id=" + Mid + "\">" + regMod.UserName + "</a> >> "; addtree.Text = "<a href=\"AddPageTemplate.aspx?id=" + Mid + "\">添加自定义用户黄页栏目</a>"; } MyBind(); Call.SetBreadCrumb(Master, "<li><a href='PageManage.aspx'>企业黄页</a><li><a href='PageStyle.aspx'>黄页样式</a></li></li><li class='active'>黄页栏目<a href='AddPageTemplate.aspx?styleid=" + StyleID + "'>[添加栏目]</a></li>"); } }
protected void Page_Load(object sender, EventArgs e) { sid = DataConverter.CLng(base.Request.QueryString["sid"]); id = DataConverter.CLng(base.Request.QueryString["id"]); styleids = DataConverter.CLng(base.Request.QueryString["styleids"]); PageparentID = DataConverter.CLng(base.Request.QueryString["ParentID"]); if (!IsPostBack) { Call.HideBread(Master); BindDP(); #region 判断添加、修改 //else if (styleids > 0) //{ // loadmenulist(UserID); // int groupid = DataConverter.CLng(tll.Getbyid(styleids).UserGroup); // string nodename = sll.Getpagestrylebyid(groupid).PageNodeName.ToString(); // Label1_Hid.Value = "<a href=\"PageTemplate.aspx?styleid=" + groupid + "\">[黄页栏目管理]</a><a href=\"PageTemplate.aspx?styleid=" + groupid + "\">样式栏目设置</a>" + nodename; // Label2_Hid.Value = "修改黄页栏目"; // Label3.Text = "修改黄页栏目"; // Button1.Text = "修改栏目"; // returnurl = "PageTemplate.aspx?styleid=" + groupid + ""; // Tempinfo = tll.Getbyid(styleids); // PageStyle_DP.SelectedValue = Tempinfo.UserGroup; // StyleID_Hid.Value = Tempinfo.UserGroup; //} if (sid > 0)//修改 { string nodename = ull.SeachByID(UserID).UserName; loadmenulist(UserID); int PageStyleid = 0; DataTable regdt = mll.SelectTableName("ZL_Pagereg", "TableName like 'ZL_Reg_%' and UserName='******'"); if (regdt != null && regdt.Rows.Count > 0) { string PageTableName = regdt.Rows[0]["TableName"].ToString(); DataTable pagetable = mll.SelectTableName(PageTableName, "UserName = '******'"); PageStyleid = DataConverter.CLng(pagetable.Rows[0]["Styleid"]); UserGroup.Value = PageStyleid.ToString(); Username.Value = nodename; } Label1_Hid.Value = "黄页管理 <a href=\"PageManage.aspx\">[黄页用户列表]</a> <a href=\"PageTemplate.aspx?id=" + UserID + "\">" + nodename + "</a> "; Label2_Hid.Value = "修改自定义用户黄页栏目"; Label3.Text = "修改栏目"; Button1.Text = "修改栏目"; returnurl = "PageTemplate.aspx?id=" + UserID + ""; Tempinfo = tll.Getbyid(sid); PageStyle_DP.SelectedValue = Tempinfo.UserGroup; } else if (StyleID > 0)//从样式列表处跳转 { M_PageStyle styleinfo = sll.Getpagestrylebyid(StyleID); string nodename = styleinfo.PageNodeName; returnurl = "PageTemplate.aspx?styleid=" + StyleID + ""; UserGroup.Value = StyleID.ToString(); loadmenulist(UserID); if (PageparentID > 0) { string snodename = tll.Getbyid(PageparentID).TemplateName; Label1_Hid.Value = "<a href=\"PageTemplate.aspx?styleid=" + StyleID + "\">[黄页栏目管理]</a><a href=\"PageTemplate.aspx?styleid=" + StyleID + "\">样式栏目设置</a> " + nodename; Label2_Hid.Value = "添加黄页子栏目"; Label3.Text = "添加黄页子栏目 [" + snodename + "]"; } else { Label1_Hid.Value = "<a href=\"PageTemplate.aspx?styleid=" + StyleID + "\">[黄页栏目管理]</a> <a href=\"PageTemplate.aspx?styleid=" + StyleID + "\">样式栏目设置</a>" + nodename; Label2_Hid.Value = "添加黄页栏目"; Label3.Text = "添加黄页样式栏目"; } PageStyle_DP.SelectedValue = StyleID.ToString(); } else if (id > 0) { M_PageReg m_PageReg = regBll.SelReturnModel(DataConverter.CLng(Request["id"])); string nodename = m_PageReg.UserName; DataTable cmdtable = mll.SelectTableName("ZL_Pagereg", "TableName like 'ZL_Reg_%' and UserName='******'"); string PageTableName = cmdtable.Rows[0]["TableName"].ToString(); DataTable pagetable = mll.SelectTableName(PageTableName, "UserName = '******'"); int PageStyleid = DataConverter.CLng(pagetable.Rows[0]["Styleid"]); UserGroup.Value = PageStyleid.ToString(); Username.Value = nodename; string tempoptionlist = "<select name=\"ParentID\" id=\"ParentID\">"; tempoptionlist = tempoptionlist + "<option value=\"0\">请选择栏目</option>"; loadmenulist(UserID); Label1_Hid.Value = "黄页管理 <a href=\"PageTemplate.aspx?id=" + id + "\">[黄页用户列表]</a> <a href=\"PageTemplate.aspx?id=" + id + "\">" + nodename + "</a> "; Label2_Hid.Value = "添加自定义用户黄页栏目"; Label3.Text = "添加自定义用户黄页栏目"; returnurl = "PageTemplate.aspx?id=" + id + "&userid=" + UserID; Userids.Value = ull.GetUserByName(nodename).UserID.ToString(); } #endregion #region 初始化界面默认值 if (sid > 0 || styleids > 0) { if (Tempinfo != null)//修改栏目 { if (!IsPostBack) { templateName.Text = Tempinfo.TemplateName; //栏目名称 templateUrl_hid.Value = Tempinfo.TemplateUrl.ToString(); //栏目模板地址 templateType.Text = Tempinfo.TemplateType.ToString(); //栏目类型 OpenType.Text = Tempinfo.OpenType.ToString(); //打开方式 isTrue.Text = Tempinfo.IsTrue.ToString(); //启用状态 identifiers.Text = Tempinfo.Identifiers.ToString(); //标识符 NodeFileEx.Text = Tempinfo.NodeFileEx.ToString(); //栏目扩展名 ContentFileEx.Text = Tempinfo.ContentFileEx; //内容页扩展名 addtime.Text = Tempinfo.Addtime.ToString(); //添加时间 Nodeimgurl.Text = Tempinfo.Nodeimgurl.ToString(); //栏目图片地址 Nodeimgtext.Text = Tempinfo.Nodeimgtext.ToString(); //栏目提示 Pagecontent.Text = Tempinfo.Pagecontent.ToString(); //说明 用于在单页页详细介绍单页信息,支持HTML PageMetakeyword.Text = Tempinfo.PageMetakeyword.ToString(); //META关键词 PageMetakeyinfo.Text = Tempinfo.PageMetakeyinfo.ToString(); //META网页描述 linkurl.Text = Tempinfo.Linkurl.ToString(); //外部链接地址 linkimg.Text = Tempinfo.Linkimg.ToString(); //外部链接图片地址 linktxt.Text = Tempinfo.Linktxt.ToString(); //外部链接提示 OrderID.Text = Tempinfo.OrderID.ToString(); //排序 TemplateID.Value = Tempinfo.TemplateID.ToString(); //栏目ID UserGroup.Value = Tempinfo.UserGroup; //所属样式ID PageStyle_DP.SelectedValue = Tempinfo.UserGroup; Userids.Value = Tempinfo.UserID.ToString(); //所属用户ID lblmodelstr.Value = Tempinfo.Modelinfo.ToString(); Username.Value = Tempinfo.Username.ToString(); } } } else //公用添加栏目 { TemplateID.Value = "0"; addtime.Text = DateTime.Now.ToString(); OpenType.Text = "_blank"; NodeFileEx.Text = "html"; ContentFileEx.Text = "html"; OrderID.Text = "0"; } #endregion DataTable dt = mll.SelectTableName("ZL_Model", "TableName like 'ZL_Page_%'"); Repeater1.DataSource = dt; Repeater1.DataBind(); #region 判断栏目类型 switch (templateType.Text) { case "0": //默认为栏目 typenode.Visible = true; tempurl.Visible = true; typetxt.Visible = false; urltype.Visible = false; nodetype.Visible = true; SelectModel.Visible = true; templateType.SelectedValue = "2"; break; case "1": //单页 typenode.Visible = false; tempurl.Visible = true; typetxt.Visible = true; urltype.Visible = false; nodetype.Visible = true; SelectModel.Visible = false; templateType.SelectedValue = "1"; break; case "2": //栏目 tempurl.Visible = true; typenode.Visible = true; typetxt.Visible = true; urltype.Visible = false; nodetype.Visible = true; SelectModel.Visible = true; templateType.SelectedValue = "2"; break; case "3": //url连接 typenode.Visible = false; tempurl.Visible = false; typetxt.Visible = false; urltype.Visible = true; nodetype.Visible = false; SelectModel.Visible = false; templateType.SelectedValue = "3"; break; case "4": //功能型栏目 typenode.Visible = false; tempurl.Visible = true; typetxt.Visible = false; urltype.Visible = false; nodetype.Visible = false; SelectModel.Visible = true; templateType.SelectedValue = "4"; break; default: //默认为栏目 tempurl.Visible = true; typenode.Visible = true; typetxt.Visible = true; urltype.Visible = false; nodetype.Visible = true; SelectModel.Visible = true; templateType.SelectedValue = "2"; break; } #endregion } }