protected void Page_Load(object sender, EventArgs e)
        {
            dh = new dataHandler();

            if(!IsPostBack)
            {
                buildings = new List<string>();
                SqlDataReader dr = dh.getDataReader("select * from eLocation");

                while (dr.Read())
                {
                    if (!buildings.Contains((string)dr["building"]))
                        buildings.Add((string)dr["building"]);
                }//while

                Building.DataSource = buildings;
                Building.DataBind();

                calendar.TodaysDate = DateTime.Now;
                calendar.SelectedDate = calendar.TodaysDate;
                dr.Close();

                Building.SelectedIndex = 0;
                calendar_SelectionChanged(calendar, EventArgs.Empty);
            }//!IsPostBack
        }//page_Load
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dh = new dataHandler();

            if (!IsPostBack)
            {
                refreshList();
            }//if (!IsPostBack)
        }//Page_Load
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     dh = new dataHandler();
     
 }//Page_Load