public static List <HistoryItem> DeleteSelected(string selected)
        {
            var adapter = new HistoryTableAdapter();
            var results = new List <HistoryItem>();
            var rows    = adapter.GetData();

            foreach (var row in rows)
            {
                var item = new HistoryItem();
                item.URL   = row.URL;
                item.Title = row.Title;
                item.Date  = row.Date;
                results.Add(item);

                if (selected.Contains(row.Date.ToString()))
                {
                    adapter.DeleteQuery(item.Date);
                    results.Remove(item);
                }
            }

            return(results);
        }
Beispiel #2
0
        public static void AddHistoryItem(HistoryItem item)
        {
            HistoryTableAdapter adapter = new HistoryTableAdapter();

            adapter.Insert(item.URL, item.Title, item.Date, item.DateTime);
        }
 public static void addHistoryItem(HistoryItem item)
 {
     var adapter = new HistoryTableAdapter();
 }
        // Method to delete history item from the database
        public static void DeleteItem(int index)
        {
            HistoryItem item = GetItem(index);

            adapter.Delete(item.Id, item.URL, item.Title, item.Date);
        }
 // Method to add a history item to the database
 public static void AddItem(HistoryItem item)
 {
     adapter.Insert(item.URL, item.Title, item.Date);
 }
Beispiel #6
0
 public static void AddItem(HistoryItem item)
 {
     // HisC:\Users\chapmro\Source\Repos\cpsc2713-project\WebBrowser.Logic\HistoryManager.cstoryTableAdapter adapter = new HistoryTableAdapter();
     adapter.Insert(item.URL, item.title, item.date);
 }
Beispiel #7
0
        public static void AddHistoryItem(HistoryItem item)
        {
            var adapter = new WebBrowser.Data.BrowserDBDataSetTableAdapters.HistoryTableAdapter();

            adapter.Insert(item.Title, item.URL, item.Date);
        }
        public static void addItem(HistoryItem item)
        {
            var adapter = new HistoryTableAdapter();

            adapter.Insert(item.URL, item.Title, item.Date);
        }