Esempio n. 1
0
 public static void DeleteMetaInfo(int objId, MetaType type)
 {
     SQLDataAccess.ExecuteNonQuery("DELETE FROM [SEO].[MetaInfo] WHERE ObjId=@objId and Type=@type",
                                   CommandType.Text,
                                   new SqlParameter("@objId", objId),
                                   new SqlParameter("@type", type.ToString()));
 }
Esempio n. 2
0
 public static bool IsMetaExist(int objId, MetaType type)
 {
     return SQLDataAccess.ExecuteScalar<int>("Select Count(MetaID) from [SEO].[MetaInfo] where ObjId=@ObjId and Type=@Type", CommandType.Text,
                                             new SqlParameter("@ObjId", objId),
                                             new SqlParameter("@Type", type.ToString())) > 0;
 }
Esempio n. 3
0
 public static MetaInfo GetMetaInfo(int objId, MetaType type)
 {
     return SQLDataAccess.ExecuteReadOne<MetaInfo>(
         "Select * from SEO.MetaInfo where ObjId=@objId and Type=@type", CommandType.Text,
         GetFromReader,
         new SqlParameter {ParameterName = "@objId", Value = objId},
         new SqlParameter {ParameterName = "@type", Value = type.ToString()}
         );
 }