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);
        }
예제 #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();
 }
예제 #4
0
        // 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);
        }
예제 #5
0
 // Method to add a history item to the database
 public static void AddItem(HistoryItem item)
 {
     adapter.Insert(item.URL, item.Title, item.Date);
 }
예제 #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);
 }
예제 #7
0
        public static void AddHistoryItem(HistoryItem item)
        {
            var adapter = new WebBrowser.Data.BrowserDBDataSetTableAdapters.HistoryTableAdapter();

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

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