Ejemplo n.º 1
0
        /// <summary>
        /// 添加记录
        /// </summary>
        /// <param name="content"></param>
        /// <param name="tablename"></param>
        /// <param name="keyid"></param>
        public static void Add(string content, string tablename, string keyid, Lebi_User user, Lebi_Administrator admin, Lebi_Supplier supplier, string description)
        {
            Lebi_Log log = new Lebi_Log();

            if (admin != null)
            {
                log.Admin_id  = admin.id;
                log.AdminName = admin.UserName;
            }
            if (user != null)
            {
                log.User_id  = user.id;
                log.UserName = user.UserName;
            }
            if (supplier != null)
            {
                log.Supplier_id      = supplier.id;
                log.Supplier_SubName = supplier.SubName;
            }
            if (keyid.Length > 500)
            {
                keyid = keyid.Substring(0, 500);
            }
            log.Content   = content;
            log.Keyid     = keyid;
            log.TableName = tablename;
            if (RequestTool.GetRequestUrlNonDomain().Length > 400)
            {
                log.URL = RequestTool.GetRequestUrlNonDomain().Substring(0, 400);
            }
            else
            {
                log.URL = RequestTool.GetRequestUrlNonDomain();
            }
            if (RequestTool.GetUrlReferrerNonDomain().Length > 400)
            {
                log.RefererURL = RequestTool.GetUrlReferrerNonDomain().Substring(0, 400);
            }
            else
            {
                log.RefererURL = RequestTool.GetUrlReferrerNonDomain();
            }
            if (description.Length > 500)
            {
                log.Description = description.Substring(0, 500);
            }
            else
            {
                log.Description = description;
            }
            log.IP_Add = RequestTool.GetClientIP();
            B_Lebi_Log.Add(log);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("log_view", "查看操作日志"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Log.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Log();
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_log_list", "操作日志"))
            {
                PageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Log.GetModel("id = " + id + " and Supplier_id = " + CurrentSupplier.id + "");
            if (model == null)
            {
                model = new Lebi_Log();
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public static void Update(Lebi_Log model)
 {
     D_Lebi_Log.Instance.Update(model);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public static int Add(Lebi_Log model)
 {
     return(D_Lebi_Log.Instance.Add(model));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 安全方式绑定表单数据
 /// </summary>
 public static Lebi_Log SafeBindForm(Lebi_Log model)
 {
     return(D_Lebi_Log.Instance.SafeBindForm(model));
 }