/// <summary>
        /// 添加日志
        /// </summary>
        /// <param name="Description"></param>
        /// <param name="Message"></param>
        public void WriteLog(string title, string message)
        {
            T_OperationLog_MDL logmdl = new T_OperationLog_MDL();

            logmdl.CreateDate  = DateTime.Now;
            logmdl.CreateIP    = System.Web.HttpContext.Current.Request.UserHostAddress;
            logmdl.ErrorMsg    = message;
            logmdl.Description = title;
            logmdl.UserID      = Common.Session.GetSessionInt("UserID");
            logmdl.UserName    = Common.Session.GetSession("UserName");
            dal.Add(logmdl);
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MyAddInit();
            if (!IsPostBack)
            {
                T_OperationLog_MDL operLogMDL = operLogBLL.GetModel(ConvertEx.ToInt(ID));
                if (operLogMDL != null)
                {
                    ltUserName.Text   = operLogMDL.UserName;
                    ltCreateDate.Text = ConvertEx.ToDate(operLogMDL.CreateDate).ToString("yyyy-MM-dd HH:mm:ss");
                    ltCreateIP.Text   = operLogMDL.CreateIP;

                    List <DigiPower.Onlinecol.Standard.Model.T_SystemInfo_MDL> list = new T_SystemInfo_BLL().GetModelListForCurrentType("OperationType", string.Concat("'", operLogMDL.Description, "'"));
                    if (list != null && list.Count > 0)
                    {
                        ltDescription.Text = list[0].SystemInfoName;
                    }
                    ltErrorMsg.Text = operLogMDL.ErrorMsg;
                }
            }
        }