/// <summary> /// Default Constructor /// </summary> public ContinueEnrollment() { InitializeComponent(); // Getting list of Continue enrollment items _contEnrollmentItems = new ContinueEnrollmentVm().GetContEnrInfo(); if (_contEnrollmentItems.Count != 0) { // Setting Item source of Continue Enrollment ListBox ContEnrItems.ItemsSource = _contEnrollmentItems; // Set continue enrollment table selected index to the first index SetSelectedIndex(); } // Check if Continue enrollment has record CheckContEnrolRecord(); }
/// <summary> /// OnSelectionChanged event of continue enrollment table rows /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ContEnrItems_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { SelectedItem = ContEnrItems.SelectedItem as ContinueEnrollmentVm; //Animation to show More Info Panel DoubleAnimation da = new DoubleAnimation { From = 0, To = 1, Duration = new Duration(TimeSpan.FromSeconds(0.5)) }; MoreInfoPanel.BeginAnimation(OpacityProperty, da); //Updating More Info Panel properties TxtAlias.Text = SelectedItem?.CampAlias; TxtCampName.Text = SelectedItem?.CampName; TxtDept.Text = SelectedItem?.Department; TxtLevel.Text = SelectedItem?.Level; TxtTotalRecord.Text = SelectedItem?.TotalRecord.ToString(); TxtNoSucUploads.Text = SelectedItem?.NoSuccUploads.ToString(); TxtNoRemaining.Text = SelectedItem?.NoRemaining.ToString(); TxtNoWithoutTemp.Text = SelectedItem?.NoRemaining.ToString(); }