private void BookTypes_Tapped(object sender, TappedRoutedEventArgs e) { var bookTypeList = new BookStoreManagementData.BookStoreContext().BookType.ToList(); var bookTypeInfor = bookTypeList.ElementAtOrDefault(BookTypes.SelectedIndex); BookTypeName.Text = bookTypeInfor.BookTypeName; Describe.Text = bookTypeInfor.Describe; }
private void Categorys_Tapped(object sender, TappedRoutedEventArgs e) { var CategoryList = new BookStoreManagementData.BookStoreContext().Category.ToList(); var CategoryInfor = CategoryList.ElementAtOrDefault(Categorys.SelectedIndex); CategoryName.Text = CategoryInfor.CategoryName; Describe.Text = CategoryInfor.Describe; StatusCategory.Text = CategoryInfor.StatusCategory; }
private void RightStaffs_Tapped(object sender, TappedRoutedEventArgs e) { var RightList = new BookStoreManagementData.BookStoreContext().Right.ToList(); try { var RightStaffInfor = RightList.ElementAtOrDefault(RightStaffs.SelectedIndex); RightName.Text = RightStaffInfor.RightName; Describe.Text = RightStaffInfor.Describe; if (RightStaffInfor.Status) { StatusRight.IsChecked = true; } else { StatusRight.IsChecked = false; } } catch (Exception) {} Edit.Visibility = Visibility.Visible; }