internal void Sync(int bookNum) { if (GetRegisterType(bookNum) == "Confirmation") { RegisterType.Content = "| Confirmation - Book #" + bookNum; ConfirmationEntries ce = new ConfirmationEntries(bookNum, 1); EntriesHolderGrid.Children.Add(ce); Grid.SetRow(ce, 0); Grid.SetColumn(ce, 0); } else if (GetRegisterType(bookNum) == "Baptismal") { RegisterType.Content = "| Baptismal - Book #" + bookNum; BaptismalEntries be = new BaptismalEntries(bookNum, 1); EntriesHolderGrid.Children.Add(be); Grid.SetRow(be, 0); Grid.SetColumn(be, 0); } else if (GetRegisterType(bookNum) == "Matrimonial") { RegisterType.Content = "| Matrimonial - Book #" + bookNum; MatrimonialEntries me = new MatrimonialEntries(bookNum, 1); EntriesHolderGrid.Children.Add(me); Grid.SetRow(me, 0); Grid.SetColumn(me, 0); } else if (GetRegisterType(bookNum) == "Burial") { RegisterType.Content = "| Burial - Book #" + bookNum; BurialEntries be = new BurialEntries(bookNum, 1); EntriesHolderGrid.Children.Add(be); Grid.SetRow(be, 0); Grid.SetColumn(be, 0); } }
internal void UpdatePageContent1(object sender, RoutedPropertyChangedEventArgs <double?> e) { if (Convert.ToInt32(Page.Value) < 1) { //Do nothing } else { EntriesHolderGrid.Children.Clear(); if (GetRegisterType(booknum) == "Confirmation") { ConfirmationEntries ce = new ConfirmationEntries(booknum, Convert.ToInt32(Page.Value)); EntriesHolderGrid.Children.Add(ce); Grid.SetRow(ce, 0); Grid.SetColumn(ce, 0); } else if (GetRegisterType(booknum) == "Baptismal") { BaptismalEntries be = new BaptismalEntries(booknum, Convert.ToInt32(Page.Value)); EntriesHolderGrid.Children.Add(be); Grid.SetRow(be, 0); Grid.SetColumn(be, 0); } else if (GetRegisterType(booknum) == "Matrimonial") { MatrimonialEntries me = new MatrimonialEntries(booknum, Convert.ToInt32(Page.Value)); EntriesHolderGrid.Children.Add(me); Grid.SetRow(me, 0); Grid.SetColumn(me, 0); } else if (GetRegisterType(booknum) == "Burial") { BurialEntries be = new BurialEntries(booknum, Convert.ToInt32(Page.Value)); EntriesHolderGrid.Children.Add(be); Grid.SetRow(be, 0); Grid.SetColumn(be, 0); } } }