Beispiel #1
0
 private void Load_Data()
 {
     List<string> query = new List<string>();
     query.Add("Id != 0");
     DataTable dt = ExhibitionDAO.Search(query);
     cbExhibition.DataValueField = "Id";
     cbExhibition.DataTextField = "ExhibitionName";
     cbExhibition.DataSource = dt;
     cbExhibition.DataBind();
     DataTable dtCompetitons = CompetitionDAO.Join();
     lvCompetitions.DataSource = dtCompetitons;
     lvCompetitions.DataBind();
 }
Beispiel #2
0
 private void Load_Data()
 {
     List<string> query = new List<string>();
     query.Add(String.Format("AwardName like '%{0}%'", Session["search_query"]));
     query.Add(String.Format("AwardRank like '%{0}%'", Session["search_query"]));
     DataTable dtAward = AwardDAO.Search(query);
     if (dtAward.Rows.Count > 0)
     {
         Flash.dictFlash.Add("success", String.Format("Found <b>{0} award</b> matched '<b>{1}</b>'", dtAward.Rows.Count, Session["search_query"]));
         gdvAward.DataSource = dtAward;
         gdvAward.DataBind();
     }
     else
     {
         Flash.dictFlash.Add("warning", "No data match found");
     }
 }