/// <summary> /// Filling drop down list of conference halls. /// </summary> protected void FillConfHallList() { try { // Create service wrapper. Office of = new Office(); of.Load(OfficeID.Value); using (ArrangementServiceProxy c = new ArrangementServiceProxy("http://localhost:59874/ArrangementService.svc", CurrentUser.ID)) { XMLSerializableConferenceHall[] chs = c.GetConferenceHallsList(OfficeID.Value); List<XMLSerializableConferenceHall> coll = new List<XMLSerializableConferenceHall>(); if (chs != null) { coll.AddRange(chs); } ddlConferenceHalls.DataSource = coll.ToArray(); ddlConferenceHalls.DataBind(); if (ArrangementID.HasValue) { ddlConferenceHalls.SelectedIndex = ddlConferenceHalls.Items.IndexOf(ddlConferenceHalls.Items.FindByValue(CurrentArrangement.ConferenceHallID.ToString())); } } } catch (Exception ex) { ConfirmIt.PortalLib.Logger.Logger.Instance.Error(ex.Message, ex); } }
/// <summary> /// Updates data of users. /// </summary> public void UpdateArrangementsData() { try { if (string.IsNullOrEmpty(ServiceURL)) return; try { // Create service wrapper. Office of = new Office(); of.Load(OfficeID); using (ArrangementServiceProxy c = new ArrangementServiceProxy("http://localhost:59874/ArrangementService.svc", Page.CurrentUser.ID)) { List<XMLSerializableConferenceHall> coll = new List<XMLSerializableConferenceHall>(); XMLSerializableConferenceHall[] chs = c.GetConferenceHallsList(OfficeID); if (chs != null) { coll.AddRange(chs); } grdConferenceHallsList.DataSource = coll.ToArray(); grdConferenceHallsList.DataBind(); } } catch (Exception ex) { UlterSystems.PortalLib.Logger.Log.Error(ex.Message, ex); } } finally { } }