protected void Page_Load(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } if (Session["connectionString"] == null || Session["USER"] == null) { ScriptManager.RegisterStartupScript(this, GetType(), "Logoff", "LogOff();", true); UiListadoDePoligonos.JSProperties.Add("cpLocation", "Enable"); return; } if (Session["UiListadoDePoligonos"] != null) { UiListadoDePoligonos.DataSource = Session["UiListadoDePoligonos"]; UiListadoDePoligonos.DataBind(); GenerarReporte(); } if (Session["UiListadoDeClientes"] != null) { UiListadoDeClientes.DataSource = Session["UiListadoDeClientes"]; UiListadoDeClientes.DataBind(); } if (Session["UiListaDeVendedores"] != null) { UiListaDeVendedores.DataSource = Session["UiListaDeVendedores"]; UiListaDeVendedores.DataBind(); } }
protected void UiMenuPoligono_ItemClick(object source, DevExpress.Web.MenuItemEventArgs e) { if (!ValidarConexionYUsuarioLogueado(source)) { return; } switch (e.Item.Name) { case "UiBotonGenerarExcelUiListadoDePoligonos": UiExportarVista.GridViewID = "UiListadoDePoligonos"; UiExportarVista.WriteXlsxToResponse(); break; case "UiBotonGenerarExcelUiListadoDeClientes": UiExportarVista.GridViewID = "UiListadoDeClientes"; UiExportarVista.WriteXlsxToResponse(); break; case "UiBotonGenerarReporteUiListadoDePoligonos": UiListadoDeClientes.ExpandAll(); UiPopupReporte.ShowOnPageLoad = true; break; } }
protected void Page_Load(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } if (Session["connectionString"] == null || Session["USER"] == null) { ScriptManager.RegisterStartupScript(this, GetType(), "Logoff", "LogOff();", true); //Response.Redirect("Login.aspx"); } if (!Page.IsPostBack) { UiListaDeUsuarios.GridView.Width = 350; CargarOperador(); UiFechaInicio.Value = DateTime.Today; UiFechaFinal.Value = DateTime.Today.AddDays(1); Session["RouteGPS"] = null; } if (Session["OperadorGPS"] != null) { UiListaDeUsuarios.DataSource = Session["OperadorGPS"]; UiListaDeUsuarios.DataBind(); } else { CargarOperador(); } if (Session["RouteGPS"] != null) { UiListadoDeClientes.DataSource = Session["RouteGPS"]; UiListadoDeClientes.DataBind(); } }