Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
        // adds a new rss resource.
        public void addRssSource(RssFeed rssSource)
        {
            IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();
            rssSource.idMovimiento = IdMovement;

            indignadoContext.RssFeeds.InsertOnSubmit(rssSource);
            indignadoContext.SubmitChanges();
        }
Esempio n. 2
0
        public static DTRssSource RssSourceToDT(RssFeed rssSource)
        {
            DTRssSource dtRssSource = new DTRssSource();
            dtRssSource.url = rssSource.url;
            dtRssSource.tag = rssSource.tag;
            dtRssSource.title = rssSource.titulo;
            return dtRssSource;

        }
Esempio n. 3
0
 public static RssFeed DTToRssSource(DTRssSource dtRssSource)
 {
     RssFeed rssSource = new RssFeed();
     rssSource.url = dtRssSource.url;
     rssSource.tag = dtRssSource.tag;
     rssSource.titulo = dtRssSource.title;
     return rssSource;
 }
 partial void DeleteRssFeed(RssFeed instance);
 partial void UpdateRssFeed(RssFeed instance);
 partial void InsertRssFeed(RssFeed instance);
		private void detach_RssFeeds(RssFeed entity)
		{
			this.SendPropertyChanging();
			entity.Movimiento = null;
		}
        // removes a current rss resource.
        public void removeRssSource(RssFeed rssSource)
        {
            IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();

            try {
                if (rssSource.tag == null)
                {
                    indignadoContext.ExecuteCommand("DELETE FROM RssFeeds WHERE url = {0} AND idMovimiento = {1} ", rssSource.url, IdMovement);
                }
                else
                {
                    indignadoContext.ExecuteCommand("DELETE FROM RssFeeds WHERE url = {0} AND tag = {1} AND idMovimiento = {2}  ", rssSource.url, rssSource.tag, IdMovement);
                }

            }
            catch{
            }
        }