oaPro/linminchao/xw/xw_addNews.aspx.cs
(完整代码) 1KBusing System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.BLL;
using COM.OA.Entity;
public partial class linminchao_xw_addNews : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
users loginuser = Session["loginuser"] as users;
if (loginuser == null)
{
this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../../login.aspx"));
}
}
protected void submit1_ServerClick(object sender, EventArgs e)
{
users loginuser = Session["loginuser"] as users;
news n = new news();
//获取新闻参数
string bt = this.zhuti.Value.ToString();
string nr = this.FreeTextBox1.Text.ToString();
n.n_title = bt;
n.n_content = nr;
n.n_dept_id = 1;
n.n_u_id = loginuser.u_id;
n.n_releasetime = DateTime.Now;
n.n_state = 1;
int ii = newsBLL.Insert(n);//调用插入方法
if (ii < 0)
{
Response.Write(string.Format(GetRedirect.WINALERT, "插入成功!"));
Response.Write(string.Format(GetRedirect.REDIRECT, "xw_lookNews.aspx"));
}
else {
Response.Write(string.Format(GetRedirect.WINALERT, "插入失败!"));
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
