public ModifyMembers(object _previousContent, LibraryMember data) { InitializeComponent(); libraryMemberObj = data; previousContent = _previousContent; NameBox.Text = libraryMemberObj.Name; }
public PageMemberInfo(object _previousContent, LibraryMember data) { InitializeComponent(); previousContent = _previousContent; Text_MemberNaame.Text = data.Name; //if(data.Availability)? Text_Availiblity.Text = "Avalable" : Text_Availiblity.Text = "Not Avalable"; //mediainfo = data; }
private void Click_MemberInfo(object sender, RoutedEventArgs e) { if (PeopleName.SelectedItem != null) { //MediaInfo mediainfo = (MediaInfo)peopleGrid.SelectedItems[0]; object currentContent = this.Content; LibraryMember data = (LibraryMember)PeopleName.SelectedItems[0]; //DetailMediaInfo detailsinfo = new DetailMediaInfo(currentContent); PageMemberInfo pg = new PageMemberInfo(currentContent, data); this.Content = pg; } }
private void Click_ModifyMember(object sender, RoutedEventArgs e) { if ((LibraryMember)PeopleName.SelectedItem != null) { object currentContent = this.Content; LibraryMember librarydata = (LibraryMember)PeopleName.SelectedItem; ModifyMembers newPage = new ModifyMembers(currentContent, librarydata); this.Content = newPage; } else { showErrorDialoge("Please select member"); } }
private void Click_LendMedia(object sender, RoutedEventArgs e) { if ((Media)GridBook.SelectedItem != null && (LibraryMember)PeopleName.SelectedItem != null) { Media mediaList = (Media)GridBook.SelectedItem; LibraryMember memberList = (LibraryMember)PeopleName.SelectedItem; if (mediaList.Availability) { showErrorDialoge("Sorry Media is not available."); } else { mediaList.Availability = !(mediaList.Availability); mediaList.Borrower = memberList.Name; //LibraryManager.ListLibrary.; RefreshDataGrid(); } } else { showErrorDialoge("Please select member and media both"); } }