private void NewsInfoBind() { string ID = Request.QueryString["ID"]; int i = 0; if (int.TryParse(ID, out i)) { T_NEWSBASEEntity FM = new T_NEWSBASEEntity(); FM.ID = int.Parse(ID); FM.Retrieve(); if (FM.IsPersistent) { newstitle.InnerHtml = "<span style='color:" + FM.TITLECOLOR + ";font-size:" + FM.TITLESIZE + "px;font-family:" + FM.TITLEFONT + "'>" + FM.TITLE + "</span>"; if (!"".Equals(FM.SUBTITLE)) { newstitle.InnerHtml = newstitle.InnerHtml + "<BR>"; newstitle.InnerHtml = newstitle.InnerHtml + "<span style='color:" + FM.SUBTITLECOLOR + ";font-size:" + FM.SUBTITLESIZE + "px;font-family:" + FM.SUBTITLEFONT + "'>" + FM.SUBTITLE + "</span>"; } nodename.InnerText = WebFunction.GetNodeName(FM.NODEID.ToString()); newsinfo.InnerHtml = "发布时间:" + FM.PUBLISHTIME.ToString() + " 文章来源:" + FM.COPYRIGHT + " 作者:" + FM.AUTHOR + " 点击数: " + FM.HITS.ToString(); newscontent.InnerHtml = FM.CONTENT; FM.HITS = FM.HITS + 1; FM.Save(); } } }
private void NewsInfoBind() { string ID = Request.QueryString["ID"]; int i = 0; if (int.TryParse(ID, out i)) { T_NEWSBASEEntity FM = new T_NEWSBASEEntity(); FM.ID = int.Parse(ID); FM.Retrieve(); if (FM.IsPersistent) { newstitle.InnerHtml = "<font color='" + FM.TITLECOLOR + "' size='" + FM.TITLESIZE + "' face='" + FM.TITLEFONT + "'>" + FM.TITLE + "</font>"; if (!"".Equals(FM.SUBTITLE)) { newstitle.InnerHtml = newstitle.InnerHtml + "<BR>"; newstitle.InnerHtml = newstitle.InnerHtml + "<font color='" + FM.SUBTITLECOLOR + "' size='" + FM.SUBTITLESIZE + "' face='" + FM.SUBTITLEFONT + "'>" + FM.SUBTITLE + "</font>"; } //newsinfo.InnerHtml = "发布时间:" + FM.PUBLISHTIME.ToString() + " 文章来源:" + FM.COPYRIGHT + " 作者:" + FM.AUTHOR + " 点击数: " + FM.HITS.ToString(); newscontent.InnerHtml = FM.CONTENT; FM.HITS = FM.HITS + 1; FM.Save(); } } }
protected void btnSave_Click(object sender, EventArgs e) { T_NEWSBASEEntity FM = new T_NEWSBASEEntity(); FM.ID = Sequence.GetNextValue("SEQ_T_NEWSBASE"); FM.NODEID = 64; FM.TITLE = txtTitle.Text; FM.HITS = int.Parse(txtHits.Text); FM.DEFAULTPICURL = imgPicUrl.ImageUrl; FM.PUBLISHTIME = DateTime.Now; FM.USERNAME = BaseUserName; FM.INSERTTIME = DateTime.Now; FM.Save(); Response.Redirect("processList.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { T_NEWSBASEEntity FM = new T_NEWSBASEEntity(); int i = 0; if (int.TryParse(txtID.Text, out i)) { FM.ID = i; FM.Retrieve(); if (FM.IsPersistent) { FM.TITLE = txtTitle.Text.Trim(); FM.SUBTITLE = txtSubTitle.Text.Trim(); FM.DEFAULTPICURL = imgPicUrl.ImageUrl; FM.UPDATEUSERNAME = BaseUserName; FM.UPDATETIME = DateTime.Now; FM.Save(); Response.Redirect("beststaffList.aspx"); } } }