コード例 #1
0
ファイル: Newsletter.cs プロジェクト: w3bprof/ttscrawler
        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;
        }
コード例 #2
0
ファイル: BIDVMsg.cs プロジェクト: w3bprof/ttscrawler
        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;
        }
コード例 #3
0
 public BIDVObjectDumperStep()
 {
     db = new ZetaCrawlerEntities();
 }
コード例 #4
0
ファイル: Newsletter.cs プロジェクト: w3bprof/ttscrawler
 public Newsletter()
 {
     _db = new ZetaCrawlerEntities();
 }
コード例 #5
0
ファイル: DumperStep.cs プロジェクト: w3bprof/ttscrawler
 public DumperStep()
 {
     db = new ZetaCrawlerEntities();
 }
コード例 #6
0
 public ASPNETObjectDumperStep()
 {
     db = new ZetaCrawlerEntities();
 }