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

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.Entity;
  12. using COM.OA.BLL;
  13. public partial class linminchao_closenews : System.Web.UI.Page
  14. {
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {
  17.         users loginuser = Session["loginuser"] as users;
  18.         if (loginuser == null)
  19.         {
  20.             this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../../login.aspx"));
  21.         }
  22.         else
  23.         {
  24.             int id = Int32.Parse(this.Request.QueryString["newsid"]);
  25.             int state = Int32.Parse(this.Request.QueryString["state"]);
  26.             news list = newsBLL.Select(id);
  27.             list.n_state = state;
  28.             int ii = newsBLL.Update(list);
  29.             if (ii < 0)
  30.             {
  31.                 this.Response.Write(string.Format(GetRedirect.REDIRECT, "xw_glNews.aspx?state=" + state));
  32.             }
  33.             else
  34.             {
  35.                 this.Response.Write(string.Format(GetRedirect.REDIRECT, "xw_cuowu.aspx"));
  36.             }
  37.         }
  38.     }
  39. }