Exemplo n.º 1
0
        /// <summary>
        /// 新的 日志 记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool ADDCommonConfigLogInfo(CommonConfigLogModel model)
        {
            var connString = ConfigurationManager.ConnectionStrings["Tuhu_log"].ConnectionString;

            using (var conn = new SqlConnection(connString))
            {
                return(dal.ADDCommonConfigLogInfo(conn, model));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 新的 日志 记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddCommonConfigLogInfo(CommonConfigLogModel model)
        {
            var connString = ConfigurationManager.ConnectionStrings["Tuhu_log"].ConnectionString;

            if (string.IsNullOrWhiteSpace(model.CreateDateTime))
            {
                model.CreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            }
            if (string.IsNullOrWhiteSpace(model.LastUpdateDateTime))
            {
                model.LastUpdateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            }
            using (var conn = new SqlConnection(connString))
            {
                return(dal.ADDCommonConfigLogInfo(conn, model));
            }
        }