Beispiel #1
0
 public MainUIWindow(string role, int cusID)
 {
     InitializeComponent();
     bll = new MainUIBLL();
     this.role = role;
     this.cusID = cusID;
     DetailBLL bllDetail = new DetailBLL();
     textBlockTotalQuantity.Text = bllDetail.ShowTotalProCate(this.cusID).ToString();
     List<Book> bookList = new List<Book>();
     List<Magazine> magaList = new List<Magazine>();
     bookList = bll.getallBookUI();
     magaList = bll.getallMagaUI();
     Separator separator = new Separator();
     separator.Width = 795;
     DisplayBookUI.Children.Add(separator);
     List<ProductDisplay> proList = new List<ProductDisplay>();
     proList = getAllProduct(bookList, magaList);
     proList.Sort(
         delegate (ProductDisplay p1, ProductDisplay p2)
         {
             return p2.Date.CompareTo(p1.Date);
         }
     );
     if (this.role == "Manager")
     {
         manage.Visibility = Visibility.Visible;
         manage.IsEnabled = true;
     }
     getallProUI(proList, "All");
     ProType.SelectionChanged += ProType_SelectionChanged;
     Instock.SelectionChanged += Instock_SelectionChanged;
     Search.Click += Search_click;
     ProSort.SelectionChanged += ProSort_SelectionChanged;
     SearchTaskBar.KeyDown += Search_KeyDown;
 }
Beispiel #2
0
        public List <Detail> GetAllDetailByResourceID(string RID)
        {
            DetailBLL DetailBLL = new DetailBLL();

            return(DetailBLL.GetAllDetailByResourceID(RID));
        }