Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public BIDVObjectDumperStep()
 {
     db = new ZetaCrawlerEntities();
 }
Ejemplo n.º 4
0
 public Newsletter()
 {
     _db = new ZetaCrawlerEntities();
 }
Ejemplo n.º 5
0
 public DumperStep()
 {
     db = new ZetaCrawlerEntities();
 }
Ejemplo n.º 6
0
 public ASPNETObjectDumperStep()
 {
     db = new ZetaCrawlerEntities();
 }