protected void btnBuscar_Click(object sender, EventArgs e) { clientesServices.CargarClientes(new Guid(Session["UidFranquiciaMaster"].ToString())); gvClientes.DataSource = clientesServices.lsClientesGridViewModel; gvClientes.DataBind(); panelFranquicias.Visible = true; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //ScriptManager.RegisterStartupScript(this, this.GetType(), "FormScript", "hideAlert()", true); #region Direccion Session["paisesServices"] = paisesServices; Session["estadosServices"] = estadosServices; Session["municipiosServices"] = municipiosServices; Session["ciudadesServices"] = ciudadesServices; Session["coloniasServices"] = coloniasServices; #endregion Session["clientesServices"] = clientesServices; Session["telefonosClientesServices"] = telefonosClientesServices; Session["estatusService"] = estatusService; if (Session["UidFranquiciaMaster"] != null) { ViewState["UidFranquiciaLocal"] = Session["UidFranquiciaMaster"]; } else { ViewState["UidFranquiciaLocal"] = Guid.Empty; } clientesServices.CargarClientes(Guid.Parse(ViewState["UidFranquiciaLocal"].ToString())); gvClientes.DataSource = clientesServices.lsClientesGridViewModel; gvClientes.DataBind(); ddlZonaHoraria.DataSource = TimeZoneInfo.GetSystemTimeZones(); ddlZonaHoraria.DataTextField = "DisplayName"; ddlZonaHoraria.DataValueField = "Id"; ddlZonaHoraria.DataBind(); estatusService.CargarEstatus(); ddlEstatus.DataSource = estatusService.lsEstatus; ddlEstatus.DataTextField = "VchDescripcion"; ddlEstatus.DataValueField = "UidEstatus"; ddlEstatus.DataBind(); tiposTelefonosServices.CargarTiposTelefonos(); ddlTipoTelefono.DataSource = tiposTelefonosServices.lsTiposTelefonos; ddlTipoTelefono.DataTextField = "VchDescripcion"; ddlTipoTelefono.DataValueField = "UidTipoTelefono"; ddlTipoTelefono.DataBind(); paisesServices.CargarPaises(); ddlPais.DataSource = paisesServices.lsPaises; ddlPais.DataTextField = "VchPais"; ddlPais.DataValueField = "UidPais"; ddlPais.DataBind(); } else { #region Direccion paisesServices = (PaisesServices)Session["paisesServices"]; estadosServices = (EstadosServices)Session["estadosServices"]; municipiosServices = (MunicipiosServices)Session["municipiosServices"]; ciudadesServices = (CiudadesServices)Session["ciudadesServices"]; coloniasServices = (ColoniasServices)Session["coloniasServices"]; #endregion clientesServices = (ClientesServices)Session["clientesServices"]; telefonosClientesServices = (TelefonosClientesServices)Session["telefonosClientesServices"]; estatusService = (EstatusServices)Session["estatusService"]; tiposTelefonosServices = (TiposTelefonosServices)Session["tiposTelefonosServices"]; pnlAlert.Visible = false; lblMensajeAlert.Text = ""; divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade"); } }