public static List<string> GetNewsToday() { List<string> tmp = new List<string>(); TextExtraction t = new TextExtraction(); ZetaCrawlerEntities db = new ZetaCrawlerEntities(); string[] strSplit = { "/" }; var pBIDV = from q in db.BIDVObjects where ((q.IsToEmail == false) && (q.LastModified.Value.Day == DateTime.Now.Day)) select q; foreach (var item in pBIDV) { tmp.Add("<br />" + "[" + item.LastModified.ToString() + "] " + "<b>" + t.GetBetween2Words("Trích yếu: ", "Độ khẩn", item.Summary) + "</b><br />Xem chi tiết : " + item.OriginalUrl + "<br />"); item.IsToEmail = true; } var pASPNET = from q in db.ASPNETObjects where ((q.IsToEmail == false) &&(q.LastModified.Value.Day == DateTime.Now.Day) ) select q; foreach (var item in pASPNET) { tmp.Add("<br />" + "[" + item.LastModified.ToString() + "] " + "<b>" + item.Summary + "</b><br />Xem chi tiết : " + item.OriginalUrl + "<br />"); item.IsToEmail = true; } db.SaveChanges(); return tmp; }
public static List<string> GetNewsToday() { List<string> tmp = new List<string>(); TextExtraction t = new TextExtraction(); ZetaCrawlerEntities db = new ZetaCrawlerEntities(); string[] strSplit = { "/" }; var p = from q in db.BIDVObjects where ((q.LastModified.Value.Day >= DateTime.Today.Day) && (q.LastModified.Value.Month == DateTime.Today.Month) && (q.LastModified.Value.Year == DateTime.Today.Year)) select q; foreach (var item in p) { tmp.Add("<br />" + "[" + item.LastModified.ToString() + "] " + "<b>" + t.GetBetween2Words("Trích yếu: ", "Độ khẩn", item.Summary) + "</b><br />Xem chi tiết : " + item.OriginalUrl + "<br />"); } return tmp; }
public BIDVObjectDumperStep() { db = new ZetaCrawlerEntities(); }
public Newsletter() { _db = new ZetaCrawlerEntities(); }
public DumperStep() { db = new ZetaCrawlerEntities(); }
public ASPNETObjectDumperStep() { db = new ZetaCrawlerEntities(); }