コード例 #1
0
        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
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dh = new dataHandler();

            if (!IsPostBack)
            {
                refreshList();
            }//if (!IsPostBack)
        }//Page_Load
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     dh = new dataHandler();
     
 }//Page_Load