/// <summary> /// Sets the active grid display. /// </summary> /// <param name="searchType">Type of the search.</param> private void SetActiveGridDisplay(WhatsNewSearchOptions.SearchTypeEnum searchType) { switch (searchType) { case WhatsNewSearchOptions.SearchTypeEnum.Updated: lblTitle.Text = GetLocalResourceObject("ModifiedAccounts_Title").ToString(); divNewAccounts.Style.Add(HtmlTextWriterStyle.Display, "none"); divUpdatedAccounts.Style.Add(HtmlTextWriterStyle.Display, "inline"); divDeletedAccounts.Style.Add(HtmlTextWriterStyle.Display, "none"); WNRequest.SearchOptions.SortExpression = grdUpdatedAccounts.SortExpression; WNRequest.SearchOptions.SortDirection = (ListSortDirection)grdUpdatedAccounts.SortDirection; grdUpdatedAccounts.DataSource = WNRequest.GetRemoteAccountsWhatsNew(); grdUpdatedAccounts.DataBind(); break; case WhatsNewSearchOptions.SearchTypeEnum.Deleted: lblTitle.Text = GetLocalResourceObject("DeletedAccounts_Title").ToString(); divNewAccounts.Style.Add(HtmlTextWriterStyle.Display, "none"); divUpdatedAccounts.Style.Add(HtmlTextWriterStyle.Display, "none"); divDeletedAccounts.Style.Add(HtmlTextWriterStyle.Display, "inline"); WNRequest.SearchOptions.SortExpression = grdDeletedAccounts.SortExpression; WNRequest.SearchOptions.SortDirection = (ListSortDirection)grdDeletedAccounts.SortDirection; grdDeletedAccounts.DataSource = WNRequest.GetRemoteAccountsWhatsNew(); grdDeletedAccounts.DataBind(); break; default: lblTitle.Text = GetLocalResourceObject("NewAccounts_Title").ToString(); divNewAccounts.Style.Add(HtmlTextWriterStyle.Display, "inline"); divUpdatedAccounts.Style.Add(HtmlTextWriterStyle.Display, "none"); divDeletedAccounts.Style.Add(HtmlTextWriterStyle.Display, "none"); WNRequest.SearchOptions.SortExpression = grdNewAccounts.SortExpression; WNRequest.SearchOptions.SortDirection = (ListSortDirection)grdNewAccounts.SortDirection; grdNewAccounts.DataSource = WNRequest.GetRemoteAccountsWhatsNew(); grdNewAccounts.DataBind(); break; } }
/// <summary> /// Sets the active grid display. /// </summary> /// <param name="searchType">Type of the search.</param> /// <param name="whatsNewRequest">The whats new request.</param> private void SetActiveGridDisplay(WhatsNewSearchOptions.SearchTypeEnum searchType, WhatsNewRequest<IHistory> whatsNewRequest) { switch (searchType) { case WhatsNewSearchOptions.SearchTypeEnum.Updated: lblNotesTitle.Text = GetLocalResourceObject("ModifiedNotes_Title").ToString(); divNewNotes.Style.Add(HtmlTextWriterStyle.Display, "none"); divChangedNotes.Style.Add(HtmlTextWriterStyle.Display, "inline"); WNRequest.SearchOptions.SortExpression = grdChangedNotes.SortExpression; WNRequest.SearchOptions.SortDirection = (ListSortDirection)grdChangedNotes.SortDirection; grdChangedNotes.DataSource = whatsNewRequest.GetRemoteNotesWhatsNew(); grdChangedNotes.DataBind(); break; default: lblNotesTitle.Text = GetLocalResourceObject("NewNotes_Title").ToString(); divNewNotes.Style.Add(HtmlTextWriterStyle.Display, "inline"); divChangedNotes.Style.Add(HtmlTextWriterStyle.Display, "none"); WNRequest.SearchOptions.SortExpression = grdNewNotes.SortExpression; WNRequest.SearchOptions.SortDirection = (ListSortDirection)grdNewNotes.SortDirection; grdNewNotes.DataSource = whatsNewRequest.GetRemoteNotesWhatsNew(); grdNewNotes.DataBind(); break; } }
/// <summary> /// Sets the active grid display. /// </summary> /// <param name="searchType">Type of the search.</param> /// <param name="whatsNewRequest">The whats new request.</param> private void SetActiveGridDisplay(WhatsNewSearchOptions.SearchTypeEnum searchType, WhatsNewRequest<IActivity> whatsNewRequest) { switch (searchType) { case WhatsNewSearchOptions.SearchTypeEnum.New: divNewActivities.Style.Add(HtmlTextWriterStyle.Display, "inline"); divUpdatedActivities.Style.Add(HtmlTextWriterStyle.Display, "none"); grdNewActivities.DataSource = whatsNewRequest.GetRemoteActivitiesWhatsNew(); grdNewActivities.DataBind(); break; case WhatsNewSearchOptions.SearchTypeEnum.Updated: divNewActivities.Style.Add(HtmlTextWriterStyle.Display, "none"); divUpdatedActivities.Style.Add(HtmlTextWriterStyle.Display, "inline"); grdUpdatedActivities.DataSource = whatsNewRequest.GetRemoteActivitiesWhatsNew(); grdUpdatedActivities.DataBind(); break; default: divNewActivities.Style.Add(HtmlTextWriterStyle.Display, "inline"); divUpdatedActivities.Style.Add(HtmlTextWriterStyle.Display, "none"); grdNewActivities.DataSource = whatsNewRequest.GetRemoteActivitiesWhatsNew(); grdNewActivities.DataBind(); break; } }
/// <summary> /// Sets the active grid display. /// </summary> /// <param name="searchType">Type of the search.</param> /// <param name="whatsNewRequest">The whats new request.</param> private void SetActiveGridDisplay(WhatsNewSearchOptions.SearchTypeEnum searchType, WhatsNewRequest<IContact> whatsNewRequest) { switch (searchType) { case WhatsNewSearchOptions.SearchTypeEnum.Updated: divNewContacts.Style.Add(HtmlTextWriterStyle.Display, "none"); divUpdatedContacts.Style.Add(HtmlTextWriterStyle.Display, "inline"); divDeletedContacts.Style.Add(HtmlTextWriterStyle.Display, "none"); grdUpdatedContacts.DataSource = WNRequest.GetRemoteContactsWhatsNew(); grdUpdatedContacts.DataBind(); break; case WhatsNewSearchOptions.SearchTypeEnum.Deleted: divNewContacts.Style.Add(HtmlTextWriterStyle.Display, "none"); divUpdatedContacts.Style.Add(HtmlTextWriterStyle.Display, "none"); divDeletedContacts.Style.Add(HtmlTextWriterStyle.Display, "inline"); grdDeletedContacts.DataSource = WNRequest.GetRemoteContactsWhatsNew(); grdDeletedContacts.DataBind(); break; default: divNewContacts.Style.Add(HtmlTextWriterStyle.Display, "inline"); divUpdatedContacts.Style.Add(HtmlTextWriterStyle.Display, "none"); divDeletedContacts.Style.Add(HtmlTextWriterStyle.Display, "none"); grdNewContacts.DataSource = WNRequest.GetRemoteContactsWhatsNew(); grdNewContacts.DataBind(); break; } }