public string GetEditHtml(RzViewContent cr) { string title = System.Web.HttpContext.Current.Server.UrlPathEncode(cr.Title); string type = System.Web.HttpContext.Current.Server.UrlPathEncode(cr.RzType); string ptype = System.Web.HttpContext.Current.Server.UrlPathEncode(pType); return Utils.AbsoluteWebRoot + @"Views\RZView.aspx?title=" + title + "&type=" + type + "&ptype=" + ptype; }
public static string GetEditHtml(RzViewContent cr) { string title = System.Web.HttpContext.Current.Server.UrlPathEncode(cr.Title); string type = System.Web.HttpContext.Current.Server.UrlPathEncode(cr.RzType); return(Utils.AbsoluteWebRoot + @"Views\RZView.aspx?title=" + title + "&type=" + type); }
protected void GridList_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { RzViewContent crl = ((RzViewContent)e.Row.DataItem); HtmlAnchor aPages = e.Row.Cells[0].FindControl("aPages") as HtmlAnchor; aPages.HRef = GetEditHtml(crl); } }
public List <RzViewContent> GetRzSourceByType(string rzType, string parent) { List <RzViewContent> list = new List <RzViewContent>(); string[] rzText = Directory.GetFiles(root + @"\" + parent + @"\" + rzType); for (int i = 0; i < rzText.Length; i++) { string filePath = rzText[i]; using (StreamReader sr = File.OpenText(filePath)) { string content = sr.ReadToEnd(); sr.Close(); RzViewContent rvc = new RzViewContent(Path.GetFileName(filePath).Replace(".txt", ""), content, rzType); list.Add(rvc); } } return(list); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string title = Request["title"]; string type = Request["type"]; string ptype = Request["ptype"] == null?"":Request["ptype"]; if (type == "产品认证" || type == "产品认证收费") { pagestring = "Rzcp.aspx"; } else if (type == "体系认证" || type == "体系认证收费") { pagestring = "Rztx.aspx"; } rvc = RZSource.Init.GetRzSourceByType(type, ptype).Find( delegate(RzViewContent rz) { return(rz.Title == title); }); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string title = Request["title"]; string type = Request["type"]; string ptype = Request["ptype"]==null?"":Request["ptype"]; if (type == "产品认证" || type == "产品认证收费") { pagestring = "Rzcp.aspx"; } else if (type == "体系认证" || type == "体系认证收费") { pagestring = "Rztx.aspx"; } rvc = RZSource.Init.GetRzSourceByType(type, ptype).Find( delegate(RzViewContent rz) { return rz.Title == title; }); } }
public List<RzViewContent> GetRzSourceByType(string rzType, string parent) { List<RzViewContent> list = new List<RzViewContent>(); string[] rzText = Directory.GetFiles(root + @"\" + parent + @"\" + rzType); for (int i = 0; i < rzText.Length; i++) { string filePath = rzText[i]; using (StreamReader sr = File.OpenText(filePath)) { string content = sr.ReadToEnd(); sr.Close(); RzViewContent rvc = new RzViewContent(Path.GetFileName(filePath).Replace(".txt", ""), content ,rzType); list.Add(rvc); } } return list; }