Example #1
0
 public static bool ExistLocalImage(Recomment image)
 {
     try
     {
         ISelectDataSourceFace query = new SelectSQL(TableName.Recomment);
         query.DataBaseAlias = Const.LogConnection;
         query.AddWhere("CoverName", image.CoverName);
         return(query.ExecuteCount() > 0);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         return(false);
     }
 }
Example #2
0
 public static bool ExistRecord(string resourceId, ResourceType type)
 {
     try
     {
         ISelectDataSourceFace query = new SelectSQL(TableName.ResourceRecord);
         query.DataBaseAlias = Const.LogConnection;
         query.AddWhere("ResourceId", resourceId.Trim());
         query.AddWhere("ResourceType", (int)type);
         return(query.ExecuteCount() > 0);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         return(true);
     }
 }
Example #3
0
 public static bool DailyFetched(ResourceType type)
 {
     try
     {
         ISelectDataSourceFace query = new SelectSQL(TableName.FetchRecord);
         query.DataBaseAlias = Const.LogConnection;
         query.AddWhere("ResourceType", (int)type);
         query.AddWhere("TimeStamp", Comparison.GreaterThan, DateTime.Now.Date);
         return(query.ExecuteCount() > 0);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         return(true);
     }
 }