Esempio n. 1
0
        /// <summary>
        ///  Loads the locations, opening times and holidays opening times for use in javascript.
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                generalErrorLbl.Text = "";

                locations           = LocationManager.GetLocations().Where(x => x.Active == true).ToList();
                openingTimes        = OpeningTime.GetOpeningTimes();
                holidayOpeningTimes = OpeningTime.GetHolidayOpeningTimes();

                foreach (LocationManager location in locations)
                {
                    TableRow row = new TableRow();

                    TableCell cell = new TableCell();
                    cell.Text = "Phone No:";
                    row.Cells.Add(cell);

                    cell      = new TableCell();
                    cell.Text = location.PhoneNo;
                    row.Cells.Add(cell);

                    LocationsTbl.Rows.Add(row);
                }
            }
            catch (Exception ex)
            {
                generalErrorLbl.Text = "An error has occured saying: " + ex.Message + " Please contact your system administrator.";
            }
        }
Esempio n. 2
0
        /// <summary>
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                generalErrorLbl.Text = "";

                //Load the locations and their opening times for using in the javascript
                locations           = LocationManager.GetLocations().Where(x => x.Active == true).ToList();
                openingTimes        = OpeningTime.GetOpeningTimes();
                holidayOpeningTimes = OpeningTime.GetHolidayOpeningTimes();

                if (!IsPostBack)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "CallhideMap", "hideMap()", true);
                }
            }
            catch (Exception ex)
            {
                generalErrorLbl.Text = "An error has occured saying: " + ex.Message + " Please contact your system administrator.";
            }
        }