Beispiel #1
0
 /// <summary>
 /// 创建日志
 /// </summary>
 /// <param name="model"></param>
 public void Create(T_SysLog model)
 {
     try
     {
         string[] arrayList = { model.LogValue, model.Operates, model.Ip, model.Editor, model.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"), model.HostName };
         string   strSql    = string.Format("insert into T_SysLog(LogValue,Operates,Ip,Editor,CreateDate,HostName) values ('{0}','{1}','{2}','{3}','{4}','{5}')", arrayList);
         DbHelper.Factory().ExecuteNonQuery(strSql.ToString());
     }
     catch (Exception) { throw; }
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="LogValue"></param>
        /// <param name="Operates"></param>
        /// <param name="Ip"></param>
        /// <param name="Editor"></param>
        /// <returns></returns>
        private T_SysLog GetModel(string LogValue, string Operates, string Ip, string Editor, string HostName)
        {
            T_SysLog model = new T_SysLog();

            model.LogValue = LogValue;
            model.Operates = Operates;
            model.Ip       = Ip;
            model.Editor   = Editor;
            model.HostName = HostName;
            return(model);
        }