Example #1
0
 public bool UpdateServiceTypeSetting(ServiceTypeSetting model)
 {
     try
     {
         return(DalBaoYangActivitySetting.UpdateServiceTypeSetting(model));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error("UpdateServiceTypeSetting", ex);
         throw ex;
     }
 }
Example #2
0
        public static bool UpdateServiceTypeSetting(ServiceTypeSetting model)
        {
            const string sql = @"UPDATE  Gungnir..ServiceTypeSetting
                                SET     ServiceType = @ServiceType ,
                                        ServiceTypeName = @ServiceTypeName ,
                                        UpdateTime = GETDATE()
                                WHERE   Id = @Id";

            var sqlParameters = new SqlParameter[]
            {
                new SqlParameter("@ServiceType", model.ServiceType),
                new SqlParameter("@ServiceTypeName", model.ServiceTypeName),
                new SqlParameter("@Id", model.Id),
            };

            return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sql, sqlParameters) > 0);
        }
Example #3
0
        public static bool InsertServiceTypeSetting(ServiceTypeSetting model)
        {
            const string sql = @" INSERT INTO Gungnir..ServiceTypeSetting
                                            ( ServiceType ,
                                              ServiceTypeName ,
                                              CreateTime ,
                                              UpdateTime
                                            )
                                    VALUES  ( @ServiceType , -- ServiceType - varchar(100)
                                              @ServiceTypeName , -- ServiceTypeName - nvarchar(200)
                                              GETDATE() , -- CreateTime - datetime
                                              GETDATE()  -- UpdateTime - datetime
                                            )
		                                    "        ;

            var sqlParameters = new SqlParameter[]
            {
                new SqlParameter("@ServiceType", model.ServiceType),
                new SqlParameter("@ServiceTypeName", model.ServiceTypeName),
            };

            return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sql, sqlParameters) > 0);
        }