protected override void OnLoad(EventArgs e) { Monitor.ContextMenuPostback += Monitor_ContextMenuPostback; chkQtree.Visible = WebSecurity.IsSecuredAllowed(Securables.ViewQtree); base.OnLoad(e); if (!IsPostBack) { this.RegisterCss(ResolveUrl("~/App_Styles/openlayers.css")); RegisterExtJsStyleSheet(); dtDesde.SelectedDate = InitialDate.Get().ToDisplayDateTime(); dtHasta.SelectedDate = FinalDate.Get().ToDisplayDateTime(); WestPanel.Enabled = !LockFilters.Get(); dtDesde.Enabled = !LockFilters.Get(); dtHasta.Enabled = !LockFilters.Get(); if (Distrito.Get() > 0) { ddlDistrito.SetSelectedValue(Distrito.Get()); } if (Location.Get() > 0) { ddlPlanta.SetSelectedValue(Location.Get()); } if (Chofer.Get() > 0) { ddlEmpleado.SetSelectedValue(Chofer.Get()); } if (TypeMobile.Get() > 0) { ddlTipoVehiculo.SetSelectedValue(TypeMobile.Get()); } if (Mobile.Get() > 0) { ddlMovil.SetSelectedValue(Mobile.Get()); } foreach (var id in PoisTypesIds.Get()) { var it = lbPuntosDeInteres.Items.FindByValue(id.ToString()); if (it != null) { it.Selected = true; } } PoisTypesIds.Set(lbPuntosDeInteres.SelectedValues); InitializeMap(); if (Mobile.Get() > 0) { LoadPositions(true); } } }
protected override void OnLoad(EventArgs e) { Monitor.ContextMenuPostback += Monitor_ContextMenuPostback; LoadQtreeInfo(); base.OnLoad(e); var empresa = DAOFactory.EmpresaDAO.FindById(ddlDistrito.Selected); var maxHours = empresa != null && empresa.Id > 0 ? empresa.MaxHorasMonitor : 24; dtvalidator.MaxRange = new TimeSpan(maxHours, 0, 0); if (!IsPostBack) { this.RegisterCss(ResolveUrl("~/App_Styles/openlayers.css")); RegisterExtJsStyleSheet(); dtDesde.SelectedDate = InitialDate.Get().ToDisplayDateTime(); dtHasta.SelectedDate = FinalDate.Get().ToDisplayDateTime(); WestPanel.Enabled = !LockFilters.Get(); dtDesde.Enabled = !LockFilters.Get(); dtHasta.Enabled = !LockFilters.Get(); if (Distrito.Get() > 0) { ddlDistrito.SetSelectedValue(Distrito.Get()); } if (Location.Get() > 0) { ddlPlanta.SetSelectedValue(Location.Get()); } if (Chofer.Get() > 0) { ddlEmpleado.SetSelectedValue(Chofer.Get()); } if (TypeMobile.Get() > 0) { ddlTipoVehiculo.SetSelectedValue(TypeMobile.Get()); } if (Mobile.Get() > 0) { ddlMovil.SetSelectedValue(Mobile.Get()); } foreach (var id in PoisTypesIds.Get()) { var it = lbPuntosDeInteres.Items.FindByValue(id.ToString()); if (it != null) { it.Selected = true; } } PoisTypesIds.Set(lbPuntosDeInteres.SelectedValues); InitializeMap(); if (Mobile.Get() > 0) { LoadPositions(true); } } }