Beispiel #1
0
 /// <summary>
 /// 修改模板基本信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateBoutiqueTemp(CarBoutiqueTempModel model)
 {
     var sql = new StringBuilder("update boutique_template set ");
     sql.Append(Helper.CreateField(model).Trim().TrimEnd(','));
     sql.Append(" where innerid = @innerid");
     try
     {
         Helper.Execute(sql.ToString(), model);
         return 1;
     }
     catch (Exception ex)
     {
         LoggerFactories.CreateLogger().Write("修改模板基本信息异常:", TraceEventType.Error, ex);
         return 0;
     }
 }
Beispiel #2
0
        /// <summary>
        /// 添加模板基本信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddBoutiqueTemp(CarBoutiqueTempModel model)
        {
            const string sql = @"INSERT INTO boutique_template
                        (innerid, tempname, introduces, pageurl, previewurl, createdtime, createrid, modifiedtime, modifierid)
                        VALUES
                        (@innerid, @tempname, @introduces, @pageurl, @previewurl, @createdtime, @createrid, @modifiedtime, @modifierid);";

            try
            {
                Helper.Execute(sql, model);
                return 1;
            }
            catch (Exception ex)
            {
                LoggerFactories.CreateLogger().Write("添加模板基本信息异常:", TraceEventType.Error, ex);
                return 0;
            }
        }