예제 #1
0
        public void CareegarGenerosDdl()
        {
            _generoBo = new GeneroBo();

            DdlGenero.DataSource = _generoBo.ObterTodosGeneros();
            DdlGenero.DataBind();
        }
        private void CarregarGenerosNoComboList()
        {
            _generoBo = new GeneroBo();
            var generos = _generoBo.ObterTodosOsGeneros();

            DdlGenero.DataSource = generos;
            DdlGenero.DataBind();
        }
예제 #3
0
        protected void CarregarGeneroNaCombo()
        {
            _generoBO = new GenerosBo();
            var generos = _generoBO.obterTodosOsGeneros();

            DdlGenero.DataSource = generos;
            DdlGenero.DataBind();
        }
        /// <summary>
        /// Metodo para Cargar genero.
        /// </summary>
        /// <remarks>
        /// Autor: David Mauricio Gutiérrez Ruiz - INTERGRUPO\dgutierrez
        /// FechaDeCreacion: 28/04/2013
        /// UltimaModificacionPor: (Nombre del Autor de la modificación - Usuario del dominio)
        /// FechaDeUltimaModificacion: (dd/MM/yyyy)
        /// EncargadoSoporte: (Nombre del Autor - Usuario del dominio)
        /// Descripción: Descripción detallada del metodo, procure especificar todo el metodo aqui.
        /// </remarks>
        private void CargarGenero()
        {
            var respuesta = WebService.Integracion.ConsultarGenListas(new Basica()
            {
                IndHabilitado = true, CodigoGrupo = "sexo"
            });

            if (respuesta.Ejecuto)
            {
                DdlGenero.DataTextField  = TEXTO;
                DdlGenero.DataValueField = VALOR;
                DdlGenero.DataSource     = respuesta.Objeto;
                DdlGenero.DataBind();
                CargaObjetos.AdicionarItemPorDefecto(DdlGenero, false);
            }
            else
            {
                MostrarMensaje(respuesta.Mensaje, TipoMensaje.Error);
            }
        }
예제 #5
0
        private void FunCargarCombos(int opcion)
        {
            try
            {
                switch (opcion)
                {
                case 0:
                    DdlTipoDocumento.DataSource = new ControllerDAO().FunGetParametroDetalle("TIPO DOCUMENTO",
                                                                                             "--Seleccione Tipo--", "S");
                    DdlTipoDocumento.DataTextField  = "Descripcion";
                    DdlTipoDocumento.DataValueField = "Codigo";
                    DdlTipoDocumento.DataBind();

                    DdlGenero.DataSource     = new ControllerDAO().FunGetParametroDetalle("GENERO", "--Seleccione Género--", "S");
                    DdlGenero.DataTextField  = "Descripcion";
                    DdlGenero.DataValueField = "Codigo";
                    DdlGenero.DataBind();

                    DdlProvincia.DataSource = new ConsultaDatosDAO().FunConsultaDatos(186,
                                                                                      0, 0, 0, "", "", "", Session["Conectar"].ToString());
                    DdlProvincia.DataTextField  = "Descripcion";
                    DdlProvincia.DataValueField = "Codigo";
                    DdlProvincia.DataBind();

                    _itemc.Text  = "--Seleccione Ciudad--";
                    _itemc.Value = "0";
                    DdlCiudad.Items.Add(_itemc);

                    DdlEstCivil.DataSource = new ControllerDAO().FunGetParametroDetalle("ESTADO CIVIL",
                                                                                        "--Seleccione Est. Civil--", "S");
                    DdlEstCivil.DataTextField  = "Descripcion";
                    DdlEstCivil.DataValueField = "Codigo";
                    DdlEstCivil.DataBind();

                    DdlDirTitular.DataSource = new ControllerDAO().FunGetParametroDetalle("TIPO DIRECCION",
                                                                                          "--Seleccione Tipo--", "S");
                    DdlDirTitular.DataTextField  = "Descripcion";
                    DdlDirTitular.DataValueField = "Codigo";
                    DdlDirTitular.DataBind();

                    DdlMailTitular.DataSource = new ControllerDAO().FunGetParametroDetalle("TIPO CORREO",
                                                                                           "--Seleccione Tipo--", "S");
                    DdlMailTitular.DataTextField  = "Descripcion";
                    DdlMailTitular.DataValueField = "Codigo";
                    DdlMailTitular.DataBind();
                    break;

                case 1:
                    DdlCiudad.DataSource = new ConsultaDatosDAO().FunConsultaDatos(186,
                                                                                   1, int.Parse(DdlProvincia.SelectedValue), 0, "", "", "", Session["Conectar"].ToString());
                    DdlCiudad.DataTextField  = "Descripcion";
                    DdlCiudad.DataValueField = "Codigo";
                    DdlCiudad.DataBind();
                    break;

                case 2:
                    _dts = new ConsultaDatosDAO().FunConsultaDatos(32, int.Parse(ViewState["CodigoPERS"].ToString()), 0,
                                                                   0, "", "", "", Session["Conectar"].ToString());

                    if (_dts.Tables[0].Rows.Count > 0)
                    {
                        DdlTipoDocumento.SelectedValue = _dts.Tables[0].Rows[0]["Tipodocumento"].ToString();
                        TxtNumeroDocumento.Text        = _dts.Tables[0].Rows[0]["Cedula"].ToString();
                        ViewState["Numdocumento"]      = TxtNumeroDocumento.Text;
                        TxtNombres.Text            = _dts.Tables[0].Rows[0]["Nombres"].ToString();
                        TxtApellidos.Text          = _dts.Tables[0].Rows[0]["Apellidos"].ToString();
                        TxtFechaNacimiento.Text    = _dts.Tables[0].Rows[0]["FechaNaci"].ToString();
                        DdlGenero.SelectedValue    = _dts.Tables[0].Rows[0]["Genero"].ToString();
                        DdlProvincia.SelectedValue = _dts.Tables[0].Rows[0]["CodProv"].ToString();
                        FunCargarCombos(1);
                        DdlCiudad.SelectedValue   = _dts.Tables[0].Rows[0]["CodCiudad"].ToString();
                        DdlEstCivil.SelectedValue = _dts.Tables[0].Rows[0]["EstCivil"].ToString();

                        _dts = new ConsultaDatosDAO().FunConsultaDatos(187, 0, 0, 0, "", TxtNumeroDocumento.Text.Trim(), "",
                                                                       Session["Conectar"].ToString());

                        ViewState["DireccionTitular"] = _dts.Tables[3];
                        ViewState["CorreoTitular"]    = _dts.Tables[4];

                        GrdvDirecTitular.DataSource = _dts.Tables[3];
                        GrdvDirecTitular.DataBind();

                        GrdvMailTitular.DataSource = _dts.Tables[4];
                        GrdvMailTitular.DataBind();
                    }
                    break;

                case 3:
                    if (ViewState["Numdocumento"].ToString() != TxtNumeroDocumento.Text.Trim())
                    {
                        _dts = new ConsultaDatosDAO().FunConsultaDatos(175, 0, 0, 0, "", TxtNumeroDocumento.Text.Trim(),
                                                                       "", Session["Conectar"].ToString());

                        if (_dts.Tables[0].Rows.Count > 0)
                        {
                            new FuncionesDAO().FunShowJSMessage("Numero de Documento ya existe..!", this);
                            TxtNumeroDocumento.Text = ViewState["Numdocumento"].ToString();
                        }
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }