Example #1
0
            /// <summary>
            ///
            /// </summary>
            public static bool CheckList(TagReadDataEventArgs e)
            {
                DataTable dt = DBHelper.GetDT();

                foreach (DataRow row in dt.Rows)
                {
                    if (row["Book_RFID_EPC"].ToString() == e.TagReadData.EpcString)
                    {
                        DBHelper.updateBook(e);
                        Console.WriteLine("Update Book call from checklist");
                    }
                }
                if (BookList.Any(p => p.EPC == e.TagReadData.EpcString))
                {
                    var list  = BookList.First(f => f.EPC == e.TagReadData.EpcString);
                    var index = BookList.IndexOf(list);
                    BookList[index].timeStamp = e.TagReadData.Time.ToString();
                    BookList[index].RSSI      = e.TagReadData.Rssi.ToString();
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
Example #2
0
        private void sortByBookId()
        {
            List <BOOK> sortedList = BookList.OrderBy(x => x.ID.ToString() == Convert.ToString(SearchByBookId)).ToList();

            sortedList.Reverse();
            BookList.Clear();
            foreach (var sortedItem in sortedList)
            {
                BookList.Add(sortedItem);
            }
            SelectedBook = BookList.First();
            OnPropertyChanged("BookList");
        }
Example #3
0
        private void sortByName()
        {
            List <BOOK> sortedList = BookList.OrderBy(x => x.NAME.ToUpper().Contains(SortByName.ToUpper())).ToList();

            sortedList.Reverse();
            BookList.Clear();
            foreach (var sortedItem in sortedList)
            {
                BookList.Add(sortedItem);
            }
            SelectedBook = BookList.First();
            OnPropertyChanged("BookList");
        }