protected void Page_Load(object sender, EventArgs e)
        {
            //modulosServices.CargarAccesosPermitidos();

            if (!IsPostBack)
            {
                ViewState["gvFranquiciatarios"] = SortDirection.Ascending;

                #region Direccion
                Session["paisesServices"]     = paisesServices;
                Session["estadosServices"]    = estadosServices;
                Session["municipiosServices"] = municipiosServices;
                Session["ciudadesServices"]   = ciudadesServices;
                Session["coloniasServices"]   = coloniasServices;
                #endregion

                Session["franquiciatariosServices"]          = franquiciatariosServices;
                Session["telefonosFranquiciatariosServices"] = telefonosFranquiciatariosServices;
                Session["estatusService"]            = estatusService;
                Session["parametrosEntradaServices"] = parametrosEntradaServices;
                Session["promocionesServices"]       = promocionesServices;

                franquiciatariosServices.CargarFranquiciatarios();
                gvFranquiciatarios.DataSource = franquiciatariosServices.lsFranquiciasGridViewModel;
                gvFranquiciatarios.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

                franquiciatariosServices          = (FranquiciatariosServices)Session["franquiciatariosServices"];
                telefonosFranquiciatariosServices = (TelefonosFranquiciatariosServices)Session["telefonosFranquiciatariosServices"];
                estatusService            = (EstatusServices)Session["estatusService"];
                tiposTelefonosServices    = (TiposTelefonosServices)Session["tiposTelefonosServices"];
                parametrosEntradaServices = (ParametrosEntradaServices)Session["parametrosEntradaServices"];
                promocionesServices       = (PromocionesServices)Session["promocionesServices"];

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");

                pnlAlertCredenciales.Visible  = false;
                lblMnsjAlertCredenciales.Text = "";
                divAlertCredenciales.Attributes.Add("class", "alert alert-danger alert-dismissible fade");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ViewState["gvAdministradores"] = SortDirection.Ascending;

                #region Direccion
                Session["paisesServices"]     = paisesServices;
                Session["estadosServices"]    = estadosServices;
                Session["municipiosServices"] = municipiosServices;
                Session["ciudadesServices"]   = ciudadesServices;
                Session["coloniasServices"]   = coloniasServices;
                #endregion

                Session["usuariosCompletosServices"] = usuariosCompletosServices;
                //Session["telefonosUsuariosServices"] = telefonosUsuariosServices;
                Session["estatusService"]           = estatusService;
                Session["franquiciatariosServices"] = franquiciatariosServices;

                usuariosCompletosServices.CargarAdministradores(Guid.Parse("7F5587BF-10C7-4164-A3F8-3D17962AB17E"));
                gvAdministradores.DataSource = usuariosCompletosServices.lsUsuariosCompletos;
                gvAdministradores.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();

                perfilesServices.CargarPerfilesDropDownListModel(Guid.Parse("7F5587BF-10C7-4164-A3F8-3D17962AB17E"));
                ddlPerfil.DataSource     = perfilesServices.lsPerfilesDropDownListModel;
                ddlPerfil.DataTextField  = "VchNombre";
                ddlPerfil.DataValueField = "UidSegPerfil";
                ddlPerfil.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

                usuariosCompletosServices = (UsuariosCompletosServices)Session["usuariosCompletosServices"];
                //telefonosUsuariosServices = (TelefonosUsuariosServices)Session["telefonosUsuariosServices"];
                franquiciatariosServices = (FranquiciatariosServices)Session["franquiciatariosServices"];

                estatusService         = (EstatusServices)Session["estatusService"];
                tiposTelefonosServices = (TiposTelefonosServices)Session["tiposTelefonosServices"];

                lblValidar.Text = string.Empty;

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");

                txtPassword.Attributes.Add("value", txtPassword.Text);
                txtRepetirPassword.Attributes.Add("value", txtRepetirPassword.Text);
            }
        }
Exemplo n.º 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var nuevoPais = PaisesServices.Factory(TextBox1, TextBox2);

            PaisesDAL.Insertar(nuevoPais);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                #region Direccion
                Session["paisesServices"]     = paisesServices;
                Session["estadosServices"]    = estadosServices;
                Session["municipiosServices"] = municipiosServices;
                Session["ciudadesServices"]   = ciudadesServices;
                Session["coloniasServices"]   = coloniasServices;
                #endregion

                Session["usuariosCompletosServices"] = usuariosCompletosServices;
                //Session["telefonosUsuariosServices"] = telefonosUsuariosServices;
                Session["estatusService"]   = estatusService;
                Session["clientesServices"] = clientesServices;

                if (Session["UidFranquiciaMaster"] != null)
                {
                    ViewState["UidFranquiciaLocal"] = Session["UidFranquiciaMaster"];
                }
                else
                {
                    ViewState["UidFranquiciaLocal"] = Guid.Empty;
                }

                usuariosCompletosServices.CargarAdministradoresCliente(new Guid(ViewState["UidFranquiciaLocal"].ToString()), new Guid("4EF31BD5-95AB-4172-AF94-E25A3CADAD74"));
                gvAdministradores.DataSource = usuariosCompletosServices.lsUsuariosCompletos;
                gvAdministradores.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();

                perfilesServices.CargarPerfilesFranquiciaDropDownListModel(new Guid(ViewState["UidFranquiciaLocal"].ToString()), new Guid("4EF31BD5-95AB-4172-AF94-E25A3CADAD74"));
                ddlPerfil.DataSource     = perfilesServices.lsPerfilesDropDownListModel;
                ddlPerfil.DataTextField  = "VchNombre";
                ddlPerfil.DataValueField = "UidSegPerfil";
                ddlPerfil.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

                usuariosCompletosServices = (UsuariosCompletosServices)Session["usuariosCompletosServices"];
                //telefonosUsuariosServices = (TelefonosUsuariosServices)Session["telefonosUsuariosServices"];

                estatusService         = (EstatusServices)Session["estatusService"];
                tiposTelefonosServices = (TiposTelefonosServices)Session["tiposTelefonosServices"];
                clientesServices       = (ClientesServices)Session["clientesServices"];

                lblValidar.Text = string.Empty;

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");

                txtPassword.Attributes.Add("value", txtPassword.Text);
                txtRepetirPassword.Attributes.Add("value", txtRepetirPassword.Text);
            }
        }
Exemplo n.º 5
0
        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");
            }
        }