Beispiel #1
0
 private void Load_Data()
 {
     List<string> query = new List<string>();
     query.Add("ID != 0");
     DataTable dtExhibition = ExhibitionDAO.Search(query);
     gdvExhibition.DataSource = dtExhibition;
     gdvExhibition.DataBind();
     lbCountExibition.Text = dtExhibition.Rows.Count.ToString();
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List<string> query = new List<string>();
                query.Add(String.Format("Permission like '%{0}%'", 2));

                ddlManagerName.DataSource = UserDAO.Search(query);
                ddlManagerName.DataValueField = "Id"; //The Value of the DropDownList, to get it you should call ddlDepartments.SelectedValue;
                ddlManagerName.DataTextField = "Name"; //The Name shown of the DropDownList.
                ddlManagerName.DataBind();
            }
        }
Beispiel #3
0
        private void Load_Data()
        {
            List<string> query = new List<string>();
            query.Add(String.Format("ExhibitionName like '%{0}%'", Session["search_query"]));
            DataTable dtExhibition = ExhibitionDAO.Search(query);

            if (dtExhibition.Rows.Count > 0)
            {
                Flash.dictFlash.Add("success", String.Format("Found <b>{0} Exhibition Name </b> matched '<b>{1}</b>'", dtExhibition.Rows.Count, Session["search_query"]));
                gdvExhibition.DataSource = dtExhibition;
                gdvExhibition.DataBind();
            }
            else
            {
                Flash.dictFlash.Add("warning", "No data match found");
            }
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Id = Convert.ToInt32(Request.QueryString["ID"]);
            if (Request.QueryString["ID"] != null)
            {
                if (!IsPostBack)
                {
                    Exhibition exhibition = ExhibitionDAO.Find(Id);

                    txtExhibitionName.Text = exhibition.ExhibitionName;
                    lbExhibitionNameErr.Text = "";

                    List<string> query = new List<string>();
                    query.Add(String.Format("Permission like '%{0}%'", 2));

                    ddlManagerName.DataSource = UserDAO.Search(query);
                    ddlManagerName.DataValueField = "Id"; //The Value of the DropDownList, to get it you should call ddlDepartments.SelectedValue;
                    ddlManagerName.DataTextField = "Name"; //The Name shown of the DropDownList.
                    ddlManagerName.SelectedValue = exhibition.ManagerId.ToString();
                    ddlManagerName.DataBind();

                    txtStartDate.Text = exhibition.StartDate.ToShortDateString();
                    lbStartDateErr.Text = "";

                    txtEndDate.Text = exhibition.EndDate.ToShortDateString();
                    lblEndDateErr.Text = "";

                    txtExhibitionDescription.Text = exhibition.ExhibitionDescription;
                    lblExhibitionDescriptionErr.Text = "";
                }
            }
            else
            {
                Response.Redirect("Index.aspx");
            }
        }
Beispiel #5
0
 private void Load_Data()
 {
     List<string> query = new List<string>();
     query.Add("Id != 0");
     DataTable dtExhibition = ExhibitionDAO.Search(query);
     lvCompetitions.DataSource = dtExhibition;
     lvCompetitions.DataBind();
 }