void edcArtists_Selected(object sender, EntityDataSourceSelectedEventArgs e)
        {
            var results = e.Results.Cast<ArtistDetail>();

            var groupedResults = results.GroupBy(r => r.WorkId);

            List<List<int>> listResults = new List<List<int>>();
            foreach (var result in groupedResults)
            {
                List<int> artistDetailIDs = new List<int>();
                foreach (var element in result)
                {
                    artistDetailIDs.Add(element.ArtistDetailID);
                }
                listResults.Add(artistDetailIDs);
            }

            var serializer = new JavaScriptSerializer();
            hfArtistSearchResultIds.Value = serializer.Serialize(listResults);
            var parameters = SearchHelper.SaveSearch("artist", ArtistSearchPanel);

            PopulateEmailShareDialog();

            DisplaySearchParameters(parameters);
        }
        // Method that hides or shows the two datapaging-controls -
        // based on how many total items there are in the database
        // for the selected category with media-items
        protected void EntityDataSourceGeneral_Selected(object sender, EntityDataSourceSelectedEventArgs e)
        {
            // Prints out the number of the total items in the category, on the page
            itmsCnterLbl2.Text = e.SelectArguments.TotalRowCount.ToString();

            if (e.SelectArguments.TotalRowCount == 0)
            {
                itemCntrDv.Visible = false;
                NonItems.Visible = true;
                (dbListView).FindControl("itemCatHdr").Visible = false;
            }
            else
            {
                itemCntrDv.Visible = true;
                NonItems.Visible = false;
                (dbListView).FindControl("itemCatHdr").Visible = true;
            }

            // Hides the two datapaging-controls if there are 5 or less of
            // the items in the category (in database)
            if (e.SelectArguments.TotalRowCount <= 5)
            {
                (dbListView).FindControl("DataPagerNumbers").Visible = false;
                (dbListView).FindControl("DataPagerNxtPrevEtc").Visible = false;
            }
            // Shows the two datapaging-controls if there are 6 or more of
            // the items in the category (in database)
            else
            {
                (dbListView).FindControl("DataPagerNumbers").Visible = true;
                (dbListView).FindControl("DataPagerNxtPrevEtc").Visible = true;
            }
        }
        protected void edcEvents_Selected(object sender, EntityDataSourceSelectedEventArgs e)
        {
            var results = e.Results.Cast<EventDetail>();

            var groupedResults = results.GroupBy(r => r.EventID);

            var resultCount = groupedResults.Count();

            List<List<int>> lstEventDetails = new List<List<int>>();

            foreach (var result in groupedResults)
            {
                List<int> eventDetailIDs = new List<int>();
                foreach (var element in result)
                {
                    eventDetailIDs.Add(element.EventDetailID);
                }

                lstEventDetails.Add(eventDetailIDs);
            }

            var serializer = new JavaScriptSerializer();

            hfPerformanceSearchResultIds.Value = serializer.Serialize(lstEventDetails);
            var searchParameters = SearchHelper.SaveSearch("performance", basicPanel, advancedPanel);

            PopulateEmailShareDialog();

            DisplaySearchParameters(searchParameters);

            CurrentPage.PageMessageBox.ShowOK(String.Concat("Results Count: ", resultCount));
        }
 protected void CourseDetailsEntityDataSource_Selected(object sender, EntityDataSourceSelectedEventArgs e)
 {
     var course = e.Results.Cast<Course>().FirstOrDefault();
     if (course != null)
     {
         var studentGrades = course.StudentGrades.ToList();
         GradesListView.DataSource = studentGrades;
         GradesListView.DataBind();
     }
 }
        // Method that hides or shows the two datapaging-controls -
        // based on how many total items there are in the database
        protected void EntityDataSourceGeneral_Selected(object sender, EntityDataSourceSelectedEventArgs e)
        {
            // Prints out the number of the total users in database - to the page
            usrsCnterLbl2.Text = e.SelectArguments.TotalRowCount.ToString();

            // Hides the two datapaging-controls if there are 5 or less
            // users in the database
            if (e.SelectArguments.TotalRowCount <= 5)
            {
                (dbListView).FindControl("DataPagerNumbers").Visible = false;
                (dbListView).FindControl("DataPagerNxtPrevEtc").Visible = false;
            }
            // Shows the two datapaging-controls if
            // there are 6 or more users in the database
            else
            {
                (dbListView).FindControl("DataPagerNumbers").Visible = true;
                (dbListView).FindControl("DataPagerNxtPrevEtc").Visible = true;
            }
        }
Example #6
0
 protected void DataSource_Selected(object sender, EntityDataSourceSelectedEventArgs e)
 {
     TotalRows = e.TotalRowCount;
 }
Example #7
0
 //-------------------------------------------------------------------------------------------
 void GridDataSource_Selected(object sender, EntityDataSourceSelectedEventArgs e)
 {
     int x = e.TotalRowCount;
            SetResults(x);
 }
Example #8
0
   void Entityds_Selected(object sender, EntityDataSourceSelectedEventArgs e)
 {
     if (e.Exception != null) return;
     SetDataSource(e.Results);
     RecordCount = e.TotalRowCount;
 }
        void RepertoireedcEvents_Selected(object sender, EntityDataSourceSelectedEventArgs e)
        {
            var results = e.Results.Cast<EventDetail>();

            var groupedResults = results.GroupBy(r => r.EventID);

            var resultCount = groupedResults.Count();

            var resultsTop = groupedResults.Take(resultCount);

            List<List<int>> lstEventDetails = new List<List<int>>();

            List<int> duplicateCheck = new List<int>();

            foreach (var result in groupedResults)
            {
                List<int> eventDetailIDs = new List<int>();
                foreach (var element in result)
                {
                    eventDetailIDs.Add(element.EventDetailID);
                }
                duplicateCheck.Add(result.Key);
                lstEventDetails.Add(eventDetailIDs);
            }

            var serializer = new JavaScriptSerializer();

            hfRepertoireSearchResultIds.Value = serializer.Serialize(lstEventDetails);
            var parameters = SearchHelper.SaveSearch("repertoire", RepertoireSearchPanel);

            PopulateEmailShareDialog();

            DisplaySearchParameters(parameters);
        }
Example #10
0
 protected void ConsultaFinalizada(object sender, EntityDataSourceSelectedEventArgs e)
 {
     totalRowsLabel.Text = e.TotalRowCount.ToString();
 }