82 lines
2.7 KiB
C#
82 lines
2.7 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Web;
|
|||
|
|
using System.Web.UI;
|
|||
|
|
using System.Web.UI.WebControls;
|
|||
|
|
|
|||
|
|
namespace Mtxfw.VipSite
|
|||
|
|
{
|
|||
|
|
public partial class Admin_Member_about_edit : Mtxfw.Utility.MemberBase
|
|||
|
|
{
|
|||
|
|
public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article();
|
|||
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|||
|
|
public String strTitle = "",strBody = "";
|
|||
|
|
public int gtype = 0;
|
|||
|
|
protected override void OnLoad(EventArgs e)
|
|||
|
|
{
|
|||
|
|
base.OnLoad(e);
|
|||
|
|
string hostname = Request.Url.Host;
|
|||
|
|
|
|||
|
|
|
|||
|
|
if (IFStores != 1)
|
|||
|
|
{
|
|||
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Data_Bind();
|
|||
|
|
|
|||
|
|
|
|||
|
|
Btn_Update.Click += delegate(object s, EventArgs ex)
|
|||
|
|
{
|
|||
|
|
Int32 ID = int.Parse(Request.QueryString["ID"]);
|
|||
|
|
Mtxfw.Model.Article model = daoArt.GetModel(ID);
|
|||
|
|
model.senderid = 0;
|
|||
|
|
model.receiverid = 0;
|
|||
|
|
model.Title = Text_Title.Text;
|
|||
|
|
model.Content = Hidd_myEditor.Value;
|
|||
|
|
model.id = ID;
|
|||
|
|
daoArt.Update(model);
|
|||
|
|
|
|||
|
|
Model.User_CZ_log logmodel = new Model.User_CZ_log();
|
|||
|
|
logmodel.MemberId = Card;
|
|||
|
|
logmodel.AddTime = DateTime.Now;
|
|||
|
|
logmodel.IP = Mtxfw.Utility.Common.GetIP;
|
|||
|
|
logmodel.Body = "修改" + model.Title + "";
|
|||
|
|
logmodel.UType = 0;
|
|||
|
|
logmodel.gtype = gtype;
|
|||
|
|
new DAL.User_CZ_log().Add(logmodel);
|
|||
|
|
ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('更新栏目成功!');location.replace('Admin_Member_about_edit.aspx?id=" + ID + "')</script>");
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void Data_Bind()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
if (Request.QueryString["ID"] != null)
|
|||
|
|
{
|
|||
|
|
strTitle = "更新栏目";
|
|||
|
|
if (!IsPostBack)
|
|||
|
|
{
|
|||
|
|
Page.Title = strTitle + " - " + GetWebName;
|
|||
|
|
Btn_Insert.Visible = false;
|
|||
|
|
}
|
|||
|
|
Mtxfw.Model.Article model = daoArt.GetModel(int.Parse(Request.QueryString["ID"]));
|
|||
|
|
if (model != null)
|
|||
|
|
{
|
|||
|
|
if (!IsPostBack)
|
|||
|
|
{
|
|||
|
|
Text_Title.Text = model.Title;
|
|||
|
|
Hidd_C.Value = model.CategoryId;
|
|||
|
|
}
|
|||
|
|
strBody = model.Content;
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|