protected void dataSourceUsers_Selecting(object sender, ObjectContainerDataSourceSelectingEventArgs e) { //if (IsPostBack) //{ //IEnumerable<UserViewData> viewData = null; ViewData = FetchData(); //if (SearchByState) // viewData = UserBLL.GetAllUsers(UserId, ddlStates.SelectedValue); //else // viewData = UserBLL.GetAllUsers(UserId, string.Empty); if (ViewData != null && ViewData.Count() > 0) { dataSourceUsers.DataSource = ViewData; } //} //else //{ // IEnumerable<UserViewData> viewData = UserBLL.GetAllUsers(UserId, string.Empty); // if (viewData != null && viewData.Count() > 0) // { // dataSourceUsers.DataSource = viewData; // } //} }
private void RetrieveAndBindData() { RetrievePendingUserRegistrations(); dataSourcePendingUsers.DataSource = ViewData; if (ViewData == null && ViewData.Count() == 0) { NoSearchResultsMessage.Visible = true; } }
private void RetrieveAndBindData() { RetrievePendingEmailVerifications(); dataSourcePendingEmailVerifications.DataSource = ViewData; //if (ViewData == null && ViewData.Count() == 0) if (ViewData == null || ViewData.Count() == 0) { NoSearchResultsMessage.Visible = true; } }
private void RetrieveAndBindData(ViewType viewType) { RetrievePendingUserRegistrations(viewType); dataSourcePendingUsers.DataSource = ViewData; if (!(ViewData != null && ViewData.Count() > 0)) { NoSearchResultsMessage.Visible = true; } else { if (IsAuthorized) { lbtnDownload.Visible = true; } } }