Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var Current = HttpContext.Current;

            usuario = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];


            if (!Page.IsPostBack)
            {
                cargarSexo();

                cargarProvincias();
                cargarLocalidades();
                //CargarGrillaEmpleado();
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
            string nombre = Session["NomUsuario"].ToString();

            // nombre de la patente de la pagina
            string[] unosPermisosTest = new string[] { "GestionEmpleado" };
            if (usuario == null || !this.Master.Autenticar(unosPermisosTest))
            {
                Response.Redirect("../Private/MenuAdministracion.aspx");
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var Current = HttpContext.Current;

            UsuarioEntidad = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            string nombre = Session["NomUsuario"].ToString();


            // nombre de la patente de la pagina
            string[] unosPermisosTest = new string[] { "NotaDeCredito" };
            if (UsuarioEntidad == null || !this.Master.Autenticar(unosPermisosTest))
            {
                Response.Redirect("../Public/Default.aspx");
            }


            if (!Page.IsPostBack)
            {
                CargarGrillaNotaDeCredito();
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            idioma = new IdiomaEntidad();
            if (!IsPostBack)
            {
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;

                //idioma = (IdiomaEntidad)Session["Idioma"];
                //if (idioma == null)
                //{
                //    idioma = new IdiomaEntidad();
                //    idioma.Descripcion = "es";
                //    Session["Idioma"] = idioma;
                //}
            }
            else
            {
                //idioma.Descripcion = Master.obtenerIdiomaCombo();
                // Session["Idioma"] = idioma;
            }

            //DropDownList lblIdioma = FindControlFromMaster<DropDownList>("ddlIdioma");
            //if (lblIdioma != null)
            //{
            //    lblIdioma.SelectedValue = idioma.Descripcion;
            //}
            usuarioentidad = (UsuarioEntidad)Session["Usuario"];
        }
Example #4
0
        private List <object> ListaResultado = new List <object>(); //xxxxx
        protected void Page_Load(object sender, EventArgs e)
        {
            usuario = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];
            try
            {
                string nombre = Session["NomUsuario"].ToString();
                lblNombreUsuario.Text = "  Hola " + nombre;
            }
            catch (Exception ex)
            {
                Response.Redirect("/Views/Public/Default.aspx");
            }
            if (!IsPostBack)
            {
                ElegirIdioma();
                Traducciones = new List <MultiIdiomaEntidad>();

                IdiomaSeleccionado.IdIdioma = Int32.Parse(ddlidioma.SelectedValue);

                IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl = IdiomaBLL.GetBLLServicioIdiomaUnico().DevuelverTodosLosTextos(IdiomaSeleccionado.IdIdioma);
                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;

                IdiomaBLL.GetBLLServicioIdiomaUnico().Traducir(IdiomaSeleccionado.IdIdioma);
            }
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var Current = HttpContext.Current;

            unUsuario = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            string nombre = Session["NomUsuario"].ToString();

            if (!Page.IsPostBack)
            {
                cargarSexo();
                CargarTipoTelefono();
                cargarProvincias();
                cargarLocalidades();
                cargarTipodeDireccion();
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
            // nombre de la patente de la pagina
            string[] unosPermisosTest = new string[] { "AltaEmpleado" };
            if (unUsuario == null || !this.Master.Autenticar(unosPermisosTest))
            {
                Response.Redirect("../Public/Default.aspx");
            }
        }
        void IObservador.Traducirme()
        {
            ListaResultado.Clear();
            RecorrerControles(this);



            Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;

            try
            {
                foreach (Control Control in ListaResultado)
                {
                    //if (Control.ID == "CerrarSesion")
                    //    Control.ID = Control.ID;
                    //string tipo;
                    //tipo = Control.GetType().ToString();
                    foreach (var traduccion in Traducciones)
                    {
                        if (Equals(Control.ID, traduccion.NombreDelControl))
                        {
                            //string tipo;
                            //tipo = Control.GetType().ToString();
                            //ESTO SON LOS <a>
                            if (Control is Label lbltradu)
                            {
                                lbltradu.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS INPUT CON TYPE TEXT O PASSWORD
                            else if (Control is TextBox)
                            {
                                var mapeo = (TextBox)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS <BUTTON>
                            else if (Control is IButtonControl)
                            {
                                var mapeo = (IButtonControl)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS <INPUT> TYPE BUTTON O SUBMIT
                            else if ((Control) is LinkButton)
                            {
                                var mapeo = (LinkButton)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                            else if (Control is Button)
                            {
                                var mapeo = (Button)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                        }
                    }
                }
            }
            catch (Exception es)
            {
                throw;
            }
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EcommerceHelper.Presentacion.Shared.PaginaMaestra p = (EcommerceHelper.Presentacion.Shared.PaginaMaestra) this.Master;
            idioma = new IdiomaEntidad();
            if (!IsPostBack)
            {
                //idioma = (IdiomaEntidad)Session["Idioma"];
                //if (idioma == null)
                //{
                //    idioma = new IdiomaEntidad();
                //    idioma.Descripcion = "Español";
                //    Session["Idioma"] = idioma;
                //}
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
            else
            {
                // crear ddl de idioma en master page administracion

                //idioma.Descripcion = Master.ElegirIdioma();
                //  Session["Idioma"] = idioma;
            }
            //DropDownList lblIdioma = FindControlFromMaster<DropDownList>("ddlIdioma");
            //if (lblIdioma != null)
            //{
            //    lblIdioma.SelectedValue = idioma.Descripcion;
            //}
        }
Example #8
0
        protected void ddlidioma_SelectedIndexChanged1(object sender, EventArgs e)
        {
            IdiomaSeleccionado.IdIdioma = Int32.Parse(ddlidioma.SelectedValue);

            IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl = IdiomaBLL.GetBLLServicioIdiomaUnico().DevuelverTodosLosTextos(IdiomaSeleccionado.IdIdioma);

            IdiomaBLL.GetBLLServicioIdiomaUnico().Traducir(IdiomaSeleccionado.IdIdioma);
        }
Example #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Traducciones = new List <MultiIdiomaEntidad>();
         Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;// xxxxxx este solo va en las paginas xxxxx
     }
 }
Example #10
0
        void IObservador.Traducirme()
        {
            ListaResultado.Clear();
            RecorrerControles(this);



            Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;

            try
            {
                foreach (Control Control in ListaResultado)
                {
                    foreach (var traduccion in Traducciones)
                    {
                        if (Equals(Control.ID, traduccion.NombreDelControl))
                        {
                            string tipo;
                            tipo = Control.GetType().ToString();
                            //ESTO SON LOS <a>
                            if (Control is Label lbltradu)
                            {
                                // var mapeo = (Label)Control;
                                lbltradu.Text = traduccion.Texto;
                                //  mapeo.InnerText = traduccion.Texto;
                            }
                            //ESTOS SON LOS INPUT CON TYPE TEXT O PASSWORD
                            else if ((Control) is System.Web.UI.WebControls.TextBox)
                            {
                                var mapeo = (System.Web.UI.WebControls.TextBox)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS <BUTTON>
                            else if ((Control) is System.Web.UI.WebControls.IButtonControl)
                            {
                                var mapeo = (System.Web.UI.WebControls.Button)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS <INPUT> TYPE BUTTON O SUBMIT
                            else if ((Control) is System.Web.UI.WebControls.LinkButton)
                            {
                                var mapeo = (System.Web.UI.WebControls.LinkButton)Control;
                                mapeo.Text = traduccion.Texto;
                            }
                            else if ((Control) is System.Web.UI.WebControls.TextBox)
                            {
                                var mapeo = (System.Web.UI.HtmlControls.HtmlInputText)Control;
                                mapeo.Value = traduccion.Texto;
                            }
                        }
                    }
                }
            }
            catch (Exception es)
            {
                throw;
            }
        }
Example #11
0
        private void Menu_Load(object sender, EventArgs e)
        {
            int      idioma   = User._userSession.IdIdioma;
            IdiomaDM idiomaDM = new IdiomaDM();

            idiomaDM = IdiomaBLL.GetAdapted(idioma);
            Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(idiomaDM.Descripcion);
            traductor();
        }
Example #12
0
        void IObservador.Traducirme()
        {
            ListaResultado.Clear();
            RecorrerControles(this);

            Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;

            try
            {
                foreach (Control Control in ListaResultado)
                {
                    if (Control.ID == "CerrarSesion")
                    {
                        Control.ID = Control.ID;
                    }
                    string tipo;
                    tipo = Control.GetType().ToString();

                    foreach (var traduccion in Traducciones)
                    {
                        if (Equals(Control.ID, traduccion.NombreDelControl))
                        {
                            //ESTO SON LOS <a>
                            if (Control is Label lbltradu)
                            {
                                lbltradu.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS INPUT CON TYPE TEXT O PASSWORD
                            else if (Control is TextBox txttradu)
                            {
                                txttradu.Text = traduccion.Texto;
                            }
                            else if (Control is Button btntradu)
                            {
                                btntradu.Text = traduccion.Texto;
                            }

                            //ESTOS SON LOS <INPUT> TYPE BUTTON O SUBMIT
                            else if (Control is LinkButton lbtntradu)
                            {
                                lbtntradu.Text = traduccion.Texto;
                            }
                            //ESTOS SON LOS <BUTTON>
                            else if (Control is IButtonControl ibtntradu)
                            {
                                ibtntradu.Text = traduccion.Texto;
                            }
                        }
                    }
                }
            }
            catch
            {
            }
        }
Example #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                cargarEmpleados();
                cargarFamilias();
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
        }
Example #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         cargarSexo();
         CargarTipoTelefono();
         cargarProvincias();
         cargarLocalidades();
         cargarTipodeDireccion();
         Traducciones = new List <MultiIdiomaEntidad>();
         Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
     }
 }
Example #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ElegirIdioma();
                Traducciones = new List <MultiIdiomaEntidad>();

                IdiomaSeleccionado.IdIdioma = Int32.Parse(ddlidioma.SelectedValue);
                //  Current.Session["Traducciones"] = IdiomaBLL.GetBLLServicioIdiomaUnico().DevuelverTodosLosTextos(IdiomaSeleccionado.IdIdioma);
                IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl = IdiomaBLL.GetBLLServicioIdiomaUnico().DevuelverTodosLosTextos(IdiomaSeleccionado.IdIdioma);
                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
                // Traducciones = (List<MultiIdiomaEntidad>)Current.Session["Traducciones"];
                IdiomaBLL.GetBLLServicioIdiomaUnico().Traducir(IdiomaSeleccionado.IdIdioma);
            }
        }
Example #16
0
 private void ObtenerIdiomaTodos()
 {
     try
     {
         this.cbIdioma.ValueMember   = "IdIdioma";
         this.cbIdioma.DisplayMember = "Descripcion";
         DataTable dtIdioma = IdiomaBLL.SelectAllLoad();
         this.cbIdioma.DataSource    = dtIdioma;
         this.cbIdioma.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Residica", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var Current = HttpContext.Current;

            usuarioentidad = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            string nombre = Session["NomUsuario"].ToString();

            if (!Page.IsPostBack)
            {
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
                CargarDirecciones();
            }
        }
Example #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var Current = HttpContext.Current;

            usuario = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            if (!IsPostBack)
            {
                CargarGrillaFactura();
                cargarEmpleados();
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
            string[] unosPermisosTest = new string[] { "AsignacionDeServicios" };
            if (usuario == null || !this.Master.Autenticar(unosPermisosTest))
            {
                Response.Redirect("../Public/Default.aspx");
            }
        }
Example #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var Current = HttpContext.Current;

            UsuarioEntidad = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            string nombre = Session["NomUsuario"].ToString();

            if (!Page.IsPostBack)
            {
                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
            string[] unosPermisosTest = new string[] { "Bitacora" };
            if (UsuarioEntidad == null || !this.Master.Autenticar(unosPermisosTest))
            {
                Response.Redirect("../Private/MenuAdministracion.aspx");
            }
        }
Example #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IdiomaSeleccionado = new IdiomaEntidad();
            EcommerceHelper.Presentacion.Shared.PaginaMaestra p = (EcommerceHelper.Presentacion.Shared.PaginaMaestra) this.Master;

            //  IdiomaSeleccionado.Descripcion = p.ElegirIdioma();
            //   Session["Idioma"] = IdiomaSeleccionado;
            // IdiomaEntidad idioma = new IdiomaEntidad();

            if (!IsPostBack)
            {
                Traducciones = new List <MultiIdiomaEntidad>();


                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;// xxxxxx este solo va en las paginas xxxxx

                //idioma = (IdiomaEntidad)Session["Idioma"];
                //if (idioma == null)
                //{
                //    idioma = new IdiomaEntidad();
                //    idioma.Descripcion = "es";
                //    Session["Idioma"] = idioma;
                //}
                //else
                //{

                //    idioma.Descripcion  = Master.ElegirIdioma();
                //    Session["Idioma"] = idioma;

                //}
            }

            //DropDownList lblIdioma = FindControlFromMaster<DropDownList>("ddlIdioma");
            //if (lblIdioma != null)
            //{
            //    lblIdioma.SelectedValue = idioma.Descripcion;
            //}
        }
Example #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ServicioBLL unServicioBLL = new ServicioBLL();

            usuarioentidad = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            string nombre = Session["NomUsuario"].ToString();

            IdiomaSeleccionado = (IdiomaEntidad)Current.Session["Idioma"];
            if (usuarioentidad == null)
            {
                Response.Redirect("Default.aspx");
            }


            // Cargo el repeater con los servicios en venta
            unServicios             = (List <ServicioEntidad>)unServicioBLL.SelectALLServicios();
            InfoServicio.DataSource = unServicios;
            InfoServicio.DataBind();

            Traducciones = new List <MultiIdiomaEntidad>();

            Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
        }
Example #22
0
        public static void Traducir(Control control)
        {
            if (control == null || control.ID == null)
            {
                return;
            }

            if (control.ID == "lbl")
            {
                LabelTexto ctr = (LabelTexto)control.Parent;
                ctr.Label = IdiomaBLL.getInstance().GetTexto(ctr.ID);
                return;
            }
            string tradu = IdiomaBLL.getInstance().GetTexto(control.ID);

            if (string.IsNullOrWhiteSpace(tradu))
            {
                return;
            }
            if (control is Label _lbl)
            {
                _lbl.Text = tradu;
            }
            if (control is HyperLink _link)
            {
                _link.Text = tradu;
            }
            if (control is LinkButton _link2)
            {
                _link2.Text = tradu;
            }
            if (control is Button _btn)
            {
                _btn.Text = tradu;
            }
        }
Example #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            idioma = new IdiomaEntidad();
            if (!IsPostBack)
            {
                //idioma = (IdiomaEntidad)Session["Idioma"];
                //if (idioma == null)
                //{
                //    idioma = new IdiomaEntidad();
                //    idioma.Descripcion = "es";
                //    Session["Idioma"] = idioma;
                //}

                Traducciones = new List <MultiIdiomaEntidad>();

                Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl;
            }
            else
            {
                // crear ddl de idioma en master page administracion

                //idioma.Descripcion = Master.obtenerIdiomaCombo();
                // Session["Idioma"] = idioma;
            }

            //DropDownList lblIdioma = FindControlFromMaster<DropDownList>("ddlIdioma");
            //if (lblIdioma != null)
            //{
            //    lblIdioma.SelectedValue = idioma.Descripcion;
            //}
            usuarioentidad = (UsuarioEntidad)Session["Usuario"];

            // DropDownList de permisos
            PermisosTodos = ManagerFamilia.PermisosTraerTodos();
            PermisosCbo   = PermisosTodos.Where(X => X.CantHijos > 0).ToList();
            Familia FamAux = new Familia();

            FamAux.IdIFamPat     = -1;
            FamAux.NombreIFamPat = "";
            PermisosCbo.Insert(0, FamAux);
            if (!IsPostBack)
            {
                cboFamilia.Items.Clear();
                cboFamilia.DataSource     = null;
                cboFamilia.DataSource     = PermisosCbo;
                cboFamilia.DataTextField  = "NombreIFamPat";
                cboFamilia.DataValueField = "IdIFamPat";
                cboFamilia.DataBind();
                LisAuxDisp = PermisosTodos.ToList();
                LisAuxAsig = new List <IFamPat>();

                ListarPermisos(LisAuxDisp, treeDisponibles);
                treeDisponibles.CollapseAll();
                Current.Session["PermisosDisp"] = LisAuxDisp;
                Current.Session["PermisosAsig"] = LisAuxAsig;
            }
            else
            {
                LisAuxDisp = (List <IFamPat>)Current.Session["PermisosDisp"];
                LisAuxAsig = new List <IFamPat>();
                LisAuxAsig = (List <IFamPat>)Current.Session["PermisosAsig"];
            }
            string[] unosPermisosTest = new string[] { "GestionPermisos" };
            if (usuarioentidad == null || !this.Master.Autenticar(unosPermisosTest))
            {
                Response.Redirect("../Private/MenuAdministracion.aspx");
            }
        }
Example #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Traducciones = new List <MultiIdiomaEntidad>();                       //xxxxxxxx copiar en formularios xxxxxxx

            Traducciones = IdiomaBLL.GetBLLServicioIdiomaUnico().TraduccionesSgl; //xxxxxxxx copiar en formularios xxxxxxx
        }