86 lines
2.6 KiB
C#
86 lines
2.6 KiB
C#
|
using BLL;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
using System.Web.UI;
|
|||
|
using System.Web.UI.WebControls;
|
|||
|
|
|||
|
namespace FineUIPro.Web.SysManage
|
|||
|
{
|
|||
|
public partial class HttpLogEdit
|
|||
|
|
|||
|
: PageBase
|
|||
|
{
|
|||
|
#region
|
|||
|
/// <summary>
|
|||
|
/// 主键
|
|||
|
/// </summary>
|
|||
|
public string HttpLogId
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return (string)ViewState["HttpLogId"];
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
ViewState["HttpLogId"] = value;
|
|||
|
}
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (!IsPostBack)
|
|||
|
{
|
|||
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|||
|
////权限按钮方法
|
|||
|
this.HttpLogId = Request.Params["HttpLogId"];
|
|||
|
if (!string.IsNullOrEmpty(this.HttpLogId))
|
|||
|
{
|
|||
|
Model.Sys_HttpLog model = BLL.SysHttplogService.GetSys_HttpLogById(this.HttpLogId);
|
|||
|
if (model != null)
|
|||
|
{
|
|||
|
if (model.LogTime != null)
|
|||
|
{
|
|||
|
this.txtLogTime.Text = string.Format("{0:yyyy-MM-dd}", model.LogTime);
|
|||
|
}
|
|||
|
this.txtUserName.Text = model.UserName;
|
|||
|
this.txtHttpUrl.Text = model.HttpUrl;
|
|||
|
this.txtLogTxt.Text = model.LogTxt;
|
|||
|
this.txtMeThod.Text = model.MeThod;
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 保存按钮
|
|||
|
/// </summary>
|
|||
|
/// <param name="sender"></param>
|
|||
|
/// <param name="e"></param>
|
|||
|
protected void btnSave_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
Model.Sys_HttpLog table = new Model.Sys_HttpLog();
|
|||
|
table.LogTime = this.txtLogTime.SelectedDate;
|
|||
|
table.UserName = this.txtUserName.Text;
|
|||
|
table.HttpUrl = this.txtHttpUrl.Text;
|
|||
|
table.LogTxt = this.txtLogTxt.Text;
|
|||
|
table.MeThod = this.txtMeThod.Text;
|
|||
|
if (string.IsNullOrEmpty(this.HttpLogId))
|
|||
|
{
|
|||
|
table.HttpLogId = SQLHelper.GetNewID(typeof(Model.Sys_HttpLog));
|
|||
|
BLL.SysHttplogService.AddSys_HttpLog(table);
|
|||
|
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
table.HttpLogId = this.HttpLogId;
|
|||
|
BLL.SysHttplogService.UpdateSys_HttpLog(table);
|
|||
|
}
|
|||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|