void LoadLibraryMaterialToEdit(ATTLibraryMaterial library) { Session["LM_LibraryMaterial"] = library; Session["LibMatID"] = library.LMaterialID; this.ddlOrg.SelectedValue = library.OrgID.ToString(); this.ddlLibrary.SelectedValue = library.LibraryID.ToString(); this.ddlCategory_Rqd.SelectedValue = library.LibraryMaterialCategory.ToString(); this.ddlType_Rqd.SelectedValue = library.LibraryMaterialType.ToString(); this.txtCallNo_Rqd.Text = library.CallNo; this.ddlLanguage_Rqd.SelectedValue = library.LanguageID.ToString(); this.ddlPublisher_Rqd.SelectedValue = library.PublisherID.ToString(); this.txtCorporateBody.Text = library.CorporateBody; this.txtTitle_Rqd.Text = library.Title; this.txtSeriesState.Text = library.SeriesStatement; this.txtNote.Text = library.Note; this.txtBrdSubHeading.Text = library.BoardSubjectHeading; this.txtGeoDescription.Text = library.GeoDescription; this.txtPhyDescription.Text = library.PhysicalDescription; library.LstLMKeyword = BLLLibraryMaterialKeyword.GetLibraryMaterialKeywordList(library.OrgID, library.LibraryID, library.LMaterialID); this.grdKeyword.DataSource = library.LstLMKeyword; this.grdKeyword.DataBind(); library.LstLMAuthor = BLLLibraryMaterialAuthor.GetLibraryMaterialAuthorList(library.OrgID, library.LibraryID, library.LMaterialID); this.grdAuthor.DataSource = library.LstLMAuthor; this.grdAuthor.DataBind(); }
protected void btnSearch_Click(object sender, EventArgs e) { try { int[] CheckedAuthors = new int[20]; int[] CheckedKeywords = new int[20]; int LanguageID; LanguageID = int.Parse(drpLanguage.SelectedValue.ToString()); CheckedAuthors = getCheckedAuthor(); CheckedKeywords = getCheckedKeyword(); if ((IsCheckedAuthor) && (IsCheckedKeyword)) { Session["SearchList"] = BLLLibraryMaterialAuthor.SearchMaterial(LanguageID, CheckedAuthors, CheckedKeywords); } else if ((IsCheckedAuthor) && (!IsCheckedKeyword)) { Session["SearchList"] = BLLLibraryMaterialAuthor.SearchMaterial(LanguageID, CheckedAuthors, null); } else if ((!IsCheckedAuthor) && (IsCheckedKeyword)) { Session["SearchList"] = BLLLibraryMaterialAuthor.SearchMaterial(LanguageID, null, CheckedKeywords); } else { Session["SearchList"] = BLLLibraryMaterialAuthor.SearchMaterial(LanguageID, null, null); } this.grdSearchResult.DataSource = (List <ATTLibraryMaterialAuthor>)Session["SearchList"]; this.grdSearchResult.DataBind(); } catch (Exception ex) { lblStatus.Text = ex.Message; } }