Ejemplo n.º 1
0
        /// <summary>
        /// 加入养肥区
        /// </summary>
        private void ItemFatten_Click(object sender, RoutedEventArgs e)
        {
            int id = Convert.ToInt32(((MenuItem)sender).Tag);

            DataFetch.Add_MoveOut(id, true);
            //获取所有书籍
            this.DataContext = DataFetch.GetBooks();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 移出养肥区
        /// </summary>
        private void MoveOut_Click(object sender, RoutedEventArgs e)
        {
            Book book = FattenArea.SelectedItem as Book;

            if (book != null && book is Book)
            {
                DataFetch.Add_MoveOut((int)book.Id, false);
                //获取所有书籍
                this.DataContext = DataFetch.GetBooks();
                UpdateFatten();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 加入养肥区
        /// </summary>
        private void ItemFatten_Click(object sender, RoutedEventArgs e)
        {
            int id = Convert.ToInt32(((MenuItem)sender).Tag);

            DataFetch.Add_MoveOut(id, true);
            //获取所有书籍
            this.DataContext = DataFetch.GetBooks();

            if (FertilizingArea.Visibility == Visibility.Visible)
            {
                //更新养肥区界面
                GetFatten();
            }
        }