Ejemplo n.º 1
0
 /// <summary>
 /// 更新车品配置
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool UpdateCarProductsFloorConfig(CarProductsFloorConfig model)
 {
     using (var conn = new SqlConnection(StrConn))
     {
         const string sql      = @"UPDATE   Configuration..CarProductsFloorConfig
                  SET FKFloorID = @FKFloorID,
                  Name = @Name,
                  Code = @Code,
                  PidCount = @PidCount,
                  PIDS = @PIDS,
                  IsEnabled = @IsEnabled,
                  UpdateTime = GETDATE()
                  WHERE PKID = @PKID;";
         var          sqlPrams = new[]
         {
             new SqlParameter("@FKFloorID", model.FKFloorID),
             new SqlParameter("@Name", model.Name),
             new SqlParameter("@Code", model.Code),
             new SqlParameter("@PidCount", model.PidCount),
             new SqlParameter("@PIDS", model.PIDS),
             new SqlParameter("@IsEnabled", model.IsEnabled),
             new SqlParameter("@PKID", model.PKID)
         };
         return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sql, sqlPrams) > 0);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新banner图片
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateCarProductsFloorConfig(CarProductsFloorConfig model)
 {
     try
     {
         return(DALCarProducts.UpdateCarProductsFloorConfig(model));
     }
     catch (Exception ex)
     {
         logger.Error("UpdateCarProductsFloorConfig", ex);
     }
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 添加车品配置
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool InsertCarProductsFloorConfig(CarProductsFloorConfig model)
 {
     using (var conn = new SqlConnection(StrConn))
     {
         const string sql      = @"INSERT INTO Configuration..CarProductsFloorConfig
                 ( FKFloorID ,
                   Name ,
                   Code ,
                   PidCount ,
                   PIDS ,
                   CreateTime ,
                   UpdateTime ,
                   IsEnabled
                 )
                 VALUES  ( @FKFloorID ,
                           @Name ,
                           @Code ,
                           @PidCount ,
                           @PIDS ,
                           @CreateTime ,
                           @UpdateTime ,
                           @IsEnabled
                 )";
         var          sqlPrams = new[]
         {
             new SqlParameter("@FKFloorID", model.FKFloorID),
             new SqlParameter("@Name", model.Name),
             new SqlParameter("@Code", model.Code),
             new SqlParameter("@PidCount", model.PidCount),
             new SqlParameter("@PIDS", model.PIDS),
             new SqlParameter("@CreateTime", DateTime.Now),
             new SqlParameter("@UpdateTime", DateTime.Now),
             new SqlParameter("@IsEnabled", model.IsEnabled)
         };
         return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sql, sqlPrams) > 0);
     }
 }