Exemplo n.º 1
0
        private void Load_Data()
        {
            List<string> query = new List<string>();
            query.Add(String.Format("Topic like '%{0}%'", Session["search_query"]));

            DataTable dtCompetition = CompetitionDAO.Search(query);
            if (dtCompetition.Rows.Count > 0)
            {
                Flash.dictFlash.Add("success", String.Format("Found <b>{0} competition </b> matched '<b>{1}</b>'", dtCompetition.Rows.Count, Session["search_query"]));
                gdvCompetitions.DataSource = dtCompetition;
                gdvCompetitions.DataBind();
                lbCountCompetition.Text = dtCompetition.Rows.Count.ToString();
            }
            else
            {
                Flash.dictFlash.Add("warning", "No data match found");
            }
        }
Exemplo n.º 2
0
 private void Load_Data()
 {
     List<string> query = new List<string>();
     query.Add("Id != 0");
     DataTable dtCompetitons = CompetitionDAO.Search(query);
     lvCompetitions.DataSource = dtCompetitons;
     lvCompetitions.DataBind();
 }