xw_glNews.aspx.cs
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:5k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using COM.OA.BLL;
  12. using COM.OA.Entity;
  13. using System.Collections.Generic;
  14. public partial class linminchao_xw_glNews : System.Web.UI.Page
  15. {
  16.     protected void Page_Load(object sender, EventArgs e)
  17.     {
  18.         users loginuser = Session["loginuser"] as users;
  19.         if (loginuser == null)
  20.         {
  21.             this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../../login.aspx"));
  22.         }
  23.         else
  24.         {
  25.             this.Response.Write("<body><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td><form name='form1' method='post' action=''><table width='96%' border='0' cellspacing='0' cellpadding='0'><tr><td width='32%' valign='middle'>&nbsp;</td><td width='47%' valign='middle'><div align='right'><input name='q' type='text' id='q'><span class='bg'><span class='bg style2'><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><input name='submit' type=submit id='submit' style='FONT-SIZE: 12px; HEIGHT: 24px' value=' 查 询 '></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></span></span> </div></td><td width='4%'><div align='right'><span class='style4'><img src='../img/txl/16.gif' width='16' height='16'></span></div></td><td width='7%'><a href='xw_addNews.aspx'>发布新闻</a></td><td width='2%'><img src='../img/txl/12.gif' width='16' height='16'/></td><td width='8%'><div align='center' ><a href='xw_lookNews.aspx'>浏览新闻</a></div></td></tr></table></form></td></tr></table>");
  26.             this.Response.Write("<div align='center'><table width='98%' border='0' cellpadding='0' cellspacing='0'><tr><td><div class='RoundedCorner'><div align='center'><b class='rtop'><b class='r1'></b><b class='r2'></b><b class='r3'></b><b class='r4'></b></b> <span class='style1'>新 闻 管 理</span></div></div></td></tr></table><table width='98%' border='0' cellpadding='3' cellspacing='1' bgcolor='#5AAE18'><tr bgcolor='#FFFFFF'><td width='57%'><div align='left' class='style8'><strong>  标 题</strong></div></td><td width='22%'><div align='center' class='style8 style4'><div align='center'>时 间</div></div></td><td width='5%'><div align='center' class='style7'><strong>开 关</strong></div></td><td width='5%'><div align='center' class='style8'><strong>修 改</strong></div></td><td width='5%'><div align='center'><strong>删 除 </strong></div></td></tr>");
  27.             IList<news> newslist = newsBLL.Select();
  28.             foreach (news n in newslist)
  29.             {
  30.                 
  31.                     this.Response.Write("<tr bgcolor='#FFFFFF'><td><div align='left'> &nbsp;<img src='../img/icon1.gif' width='8' height='10'> <a href='xw_lookOneNews.aspx?newsid=" + n.n_id + "'>" + n.n_title + "</a></div></td><td class='style21'><div align='center'><span class='style12'>2007-11-21 16:53:17</span> <span class='style12'></span></div></td><td><div align='center'>"); 
  32.                 if (n.n_state == 1)
  33.                 { 
  34.                     this.Response.Write("<a href='closenews.aspx?newsid=" + n.n_id + "&state=2'>已开通</a>");
  35.                 }
  36.                 else
  37.                 {
  38.                     this.Response.Write("<a href='closenews.aspx?newsid=" + n.n_id + "&state=1'>已关闭</a>");
  39.                 } 
  40.                 this.Response.Write("</div></td><td><div align='center'><A HREF='xw_updateNews.aspx?newsid=" + n.n_id + "' class='style9'>修改</A></div></td><td><div align='center'><A HREF='xw_shanchu.aspx?newsid=" + n.n_id + "' onClick='return confirm('您确定要删除 行业新形势转载 新闻吗?')'>删除</A></div></td></tr>");
  41.             }
  42.             this.Response.Write("</table><br><img src='../img/up.gif' width='17' height='12'><a href='javascript:history.go(-1)'>返 回 </a>");
  43.         }
  44.     }
  45. }