Exemple #1
0
 /// <summary>
 /// 修改精品店基本信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateBoutique(CarBoutiqueModel model)
 {
     var sql = new StringBuilder("update boutique_info 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;
     }
 }
Exemple #2
0
        /// <summary>
        /// 添加精品店基本信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddBoutique(CarBoutiqueModel model)
        {
            const string sql = @"INSERT INTO boutique_info
                        (innerid, custid, enterprisename, logo, introduces, telephone, mobile, address, tempid, sort, expand, createdtime, createrid, modifiedtime, modifierid)
                        VALUES
                        (@innerid, @custid, @enterprisename, @logo, @introduces, @telephone, @mobile, @address, @tempid, @sort, @expand, @createdtime, @createrid, @modifiedtime, @modifierid);";

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