Beispiel #1
0
        public static List<string> GetCitizenList(string prefixText, int count)
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();
            ENTResponse oENTResponse = new ENTResponse();

            List<String> ServiceResponse = new List<String>();
            String Item;

            try
            {

                // Formulario
                oENTCiudadano.Nombre = prefixText;

                // Transacción
                oENTResponse = oBPCiudadano.searchCiudadano(oENTCiudadano);

                // Validaciones
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

                // Configuración de arreglo de respuesta
                foreach (DataRow rowCiudadano in oENTResponse.dsResponse.Tables[1].Rows){
                    Item = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(rowCiudadano["NombreCiudadano"].ToString(), rowCiudadano["CiudadanoId"].ToString());
                    ServiceResponse.Add(Item);
                }

            }catch (Exception){
                // Do Nothing
            }

            //Return Selected Products
            return ServiceResponse;
        }
        public static List<string> GetCitizenList(string prefixText, int count)
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();
            ENTResponse oENTResponse = new ENTResponse();

            List<String> ServiceResponse = new List<String>();
            String Item;

            // Errores conocidos:
            //		* El control toma el foco con el metodo JS Focus() sólo si es llamado con la función JS pageLoad()
            //		* No se pudo encapsular en un WUC
            //		* Si se selecciona un nombre válido, enseguida se borra y se pone uno inválido, el control almacena el ID del nombre válido, se implemento el siguiente Script en la transacción
            //			If Not Exists ( Select 1 From Ciudadano Where CiudadanoId = @CiudadanoId And ( Nombre + ' ' + ApellidoPaterno  + ' ' +  IsNull(ApellidoMaterno, '') = @NombreTemporal ) )
            //				Begin
            //					Set @CiudadanoId = 0
            //				End

            try
            {

                // Formulario
                oENTCiudadano.Nombre = prefixText;

                // Transacción
                oENTResponse = oBPCiudadano.searchCiudadano(oENTCiudadano);

                // Validaciones
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

                // Configuración de arreglo de respuesta
                foreach (DataRow rowCiudadano in oENTResponse.dsResponse.Tables[1].Rows){
                    Item = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(rowCiudadano["NombreCiudadano"].ToString(), rowCiudadano["CiudadanoId"].ToString());
                    ServiceResponse.Add(Item);
                }

            }catch (Exception){
                // Do Nothing
            }

            // Regresar listado de Ciudadanos
            return ServiceResponse;
        }
Beispiel #3
0
        public void EliminarCiudadanoSolicitud(ENTCiudadano ENTCiudadano, string ConnectionString)
        {
            SqlConnection Connection = new SqlConnection(ConnectionString);
                SqlCommand Command;
                SqlParameter Parameter;
                SqlDataAdapter DataAdapter;

                try
                {
                    Command = new SqlCommand("EliminarCiudadanoSolicitud", Connection);
                    Command.CommandType = CommandType.StoredProcedure;

                    Parameter = new SqlParameter("CiudadanoId", SqlDbType.Int);
                    Parameter.Value = ENTCiudadano.CiudadanoId;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("SolicitudId", SqlDbType.Int);
                    Parameter.Value = ENTCiudadano.SolicitudId;
                    Command.Parameters.Add(Parameter);

                    DataAdapter = new SqlDataAdapter(Command);

                    Connection.Open();
                    Command.ExecuteNonQuery();
                    Connection.Close();
                }

                catch (SqlException Exception)
                {
                    _ErrorId = Exception.Number;
                    _ErrorDescription = Exception.Message;

                    if (Connection.State == ConnectionState.Open)
                        Connection.Close();
                }
        }
        void InsertVisitaCiudadano_Local(String CiudadanoId, String Foco)
        {
            BPCiudadano BPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            DataTable tblCiudadano = null;
            DataRow rowCiudadano = null;

            try
            {

                // Formulario
                oENTCiudadano.CiudadanoId = Int32.Parse(CiudadanoId);

                // Transacción
                oENTResponse = BPCiudadano.SelectCiudadano_ByID(oENTCiudadano);

                // Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(oENTResponse.sMessage) + "'); function pageLoad(){ focusControl('" + this.txtCiudadano.ClientID + "'); }", true);
                    return;
                }

                // Obtener el DataTable del grid
                tblCiudadano = gcParse.GridViewToDataTable(this.gvCiudadano, false);

                // Validación de que no se haya agregado el ciudadano
                if (tblCiudadano.Select("CiudadanoId='" + oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadanoId"].ToString() + "'").Length > 0) {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('Ya ha seleccionado éste ciudadano'); function pageLoad(){ focusControl('" + this.txtCiudadano.ClientID + "'); }", true);
                    return;
                }

                // Nuevo Item
                rowCiudadano = tblCiudadano.NewRow();
                rowCiudadano["CiudadanoId"] = oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadanoId"];
                rowCiudadano["NombreCompleto"] = oENTResponse.dsResponse.Tables[1].Rows[0]["NombreCompleto"];
                rowCiudadano["Edad"] = oENTResponse.dsResponse.Tables[1].Rows[0]["Edad"];
                rowCiudadano["SexoNombre"] = oENTResponse.dsResponse.Tables[1].Rows[0]["SexoNombre"];
                rowCiudadano["TelefonoPrincipal"] = oENTResponse.dsResponse.Tables[1].Rows[0]["TelefonoPrincipal"];
                rowCiudadano["Domicilio"] = oENTResponse.dsResponse.Tables[1].Rows[0]["Domicilio"];
                tblCiudadano.Rows.Add(rowCiudadano);

                // Refrescar el Grid
                this.gvCiudadano.DataSource = tblCiudadano;
                this.gvCiudadano.DataBind();

                // Estado del atosuggest
                this.txtCiudadano.Text = "";
                this.hddCiudadanoId.Value = "";

                // Foco
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "focusControl('" + Foco + "');", true);

            }catch (Exception ex){
                throw (ex);
            }
        }
Beispiel #5
0
        public DataSet SelectCiudadano(ENTCiudadano ENTCiudadano, string ConnectionString)
        {
            DataSet ResultData = new DataSet();
                SqlConnection Connection = new SqlConnection(ConnectionString);
                SqlCommand Command;
                SqlParameter Parameter;
                SqlDataAdapter DataAdapter;

                try
                {
                    Command = new SqlCommand("ConsultarCiudadano", Connection);
                    Command.CommandType = CommandType.StoredProcedure;

                    Parameter = new SqlParameter("Nombre", SqlDbType.VarChar);
                    Parameter.Value = ENTCiudadano.Nombre;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("ApellidoPaterno", SqlDbType.VarChar);
                    Parameter.Value = ENTCiudadano.ApellidoPaterno;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("ApellidoMaterno", SqlDbType.VarChar);
                    Parameter.Value = ENTCiudadano.ApellidoMaterno;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("ColoniaId", SqlDbType.Int);
                    Parameter.Value = ENTCiudadano.ColoniaId;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("CiudadId", SqlDbType.Int);
                    Parameter.Value = ENTCiudadano.CiudadId;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("EstadoId", SqlDbType.Int);
                    Parameter.Value = ENTCiudadano.EstadoId;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("PaisId", SqlDbType.Int);
                    Parameter.Value = ENTCiudadano.PaisId;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("Calle", SqlDbType.VarChar);
                    Parameter.Value = ENTCiudadano.Calle;
                    Command.Parameters.Add(Parameter);

                    Parameter = new SqlParameter("CampoBusqueda", SqlDbType.VarChar);
                    Parameter.Value = ENTCiudadano.CampoBusqueda;
                    Command.Parameters.Add(Parameter);

                    DataAdapter = new SqlDataAdapter(Command);

                    Connection.Open();
                    DataAdapter.Fill(ResultData);
                    Connection.Close();

                    return ResultData;

                }
                catch (SqlException Exception)
                {
                    _ErrorId = Exception.Number;
                    _ErrorDescription = Exception.Message;

                    if (Connection.State == ConnectionState.Open)
                        Connection.Close();

                    return ResultData;
                }
        }
        private void ComboNacionalidad()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {
                oENTResponse = oBPCiudadano.SelectComboNacionalidad(oENTCiudadano);
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                ddlNacionalidad.DataSource = oENTResponse.dsResponse.Tables[1];
                ddlNacionalidad.DataTextField = "Nombre";
                ddlNacionalidad.DataValueField = "NacionalidadId";
                ddlNacionalidad.DataBind();

                ddlNacionalidad.Items.Insert(0, new ListItem("[Seleccione]", "0"));
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page
                    , this.GetType()
                    , Convert.ToString(Guid.NewGuid())
                    , "alert('" + gcJavascript.ClearText(ex.Message) + "');"
                   , true);
            }
        }
        private void SelectCiudadanoDetalle(Int32 CiudadanoId)
        {
            BPCiudadano BPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {

                // Formulario
                oENTCiudadano.CiudadanoId = CiudadanoId;

                // Transacción
                oENTResponse = BPCiudadano.SelectCiudadano_ByID(oENTCiudadano);

                // Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Detalle del ciudadano
                this.txtNombre.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Nombre"].ToString();
                this.txtApellidoPaterno.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["ApellidoPaterno"].ToString();
                this.txtApellidoMaterno.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["ApellidoMaterno"].ToString();
                this.txtEdad.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Edad"].ToString();
                this.txtTelefonoPrincipal.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["TelefonoPrincipal"].ToString();
                this.txtOtroTelefono.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["TelefonoOtro"].ToString();
                this.txtCorreoElectronico.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["CorreoElectronico"].ToString();
                this.txtDependientesEconomicos.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["DependientesEconomicos"].ToString();
                this.txtNombreCalle.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Calle"].ToString();
                this.txtNumExterior.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NumeroExterior"].ToString();
                this.txtNumInterior.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NumeroInterior"].ToString();
                this.txtAniosResidiendo.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["AniosResidiendoNL"].ToString();

                this.ddlSexo.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["SexoId"].ToString();
                this.ddlNacionalidad.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["NacionalidadId"].ToString();
                this.ddlOcupacion.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["OcupacionId"].ToString();
                this.ddlEscolaridad.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["EscolaridadId"].ToString();
                this.ddlEstadoCivil.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["EstadoCivilId"].ToString();
                this.ddlMedioComunicacion.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["MedioComunicacionId"].ToString();

                this.ddlPais.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["PaisId"].ToString();
                ComboEstados();

                this.ddlEstado.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["EstadoId"].ToString();
                ComboCiudades();

                this.ddlCiudad.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadId"].ToString();
                ComboColonia();

                this.ddlColonia.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["ColoniaId"].ToString();

                this.ddlPaisOrigen.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["PaisOrigenId"].ToString();
                ComboEstadosOrigen();

                this.ddlEstadoOrigen.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["EstadoOrigenId"].ToString();
                ComboCiudadesOrigen();

                this.ddlCiudadOrigen.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadOrigenId"].ToString();

            }catch (Exception ex){
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(ex.Message) + "');", true);
            }
        }
        void SelectSexo()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {
                // Transacción
                oBPCiudadano.SelectComboSexo();

                // Validaciones
                if (oBPCiudadano.ErrorId != 0) { throw new Exception(oBPCiudadano.ErrorDescription); }

                // Llenado de controles
                if (oBPCiudadano.ENTCiudadano.ResultData.Tables[0].Rows.Count > 0){
                    ddlSexo.DataSource = oBPCiudadano.ENTCiudadano.ResultData;
                    ddlSexo.DataTextField = "Nombre";
                    ddlSexo.DataValueField = "SexoId";
                    ddlSexo.DataBind();
                }

            }catch (Exception ex){
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(ex.Message) + "');", true);
            }
        }
Beispiel #9
0
        private void SelectSexo_Action()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {

                oBPCiudadano.SelectComboSexo();

                if (oBPCiudadano.ErrorId == 0)
                {
                    if (oBPCiudadano.ENTCiudadano.ResultData.Tables[0].Rows.Count > 0)
                    {
                        this.ddlSexo.DataSource = oBPCiudadano.ENTCiudadano.ResultData;
                        this.ddlSexo.DataTextField = "Nombre";
                        this.ddlSexo.DataValueField = "SexoId";
                        this.ddlSexo.DataBind();
                    }

                    // Agregar Item de selección
                    this.ddlSexo.Items.Insert(0, new ListItem("[Seleccione]", "0"));

                }

            }catch (Exception ex){
                throw (ex);
            }
        }
        // Runtinas del programador
        private void selectCiudadano()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();
            ENTResponse oENTResponse = new ENTResponse();

            // Limpiar mensajes anteriores
            this.lblMessage.Text = "";

            try
            {

                // Formulario
                oENTCiudadano.Nombre = this.txtNombre.Text.Trim();

                // Transacción
                oENTResponse = oBPCiudadano.searchCiudadano(oENTCiudadano);

                // Validaciones
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }

                // Mensaje de la BD
                if (oENTResponse.sMessage != "")
                {
                    this.lblMessage.Text = oENTResponse.sMessage;
                    this.gvCiudadano.DataSource = null;
                    this.gvCiudadano.DataBind();
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "focusControl('" + this.txtNombre.ClientID + "');", true);
                    return;
                }

                // Llenado de contClientees
                this.gvCiudadano.DataSource = oENTResponse.dsResponse.Tables[1];
                this.gvCiudadano.DataBind();

                // Foco
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "focusControl('" + this.txtNombre.ClientID + "');", true);

            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Beispiel #11
0
        ///<remarks>
        ///   <name>DACiudadano.InsertCiudadano</name>
        ///   <create>04/abr/2014</create>
        ///   <author>Jose.Gomez</author>
        ///</remarks>
        ///<summary>Modifica ciudadanos en el sistema</summary>
        public ENTResponse UpdateCiudadano(ENTCiudadano oENTCiudadano, string sConnectionString, int iAlternativeTimeOut)
        {
            SqlConnection Connection = new SqlConnection(sConnectionString);
                SqlCommand Command;
                SqlDataAdapter DataAdapter;
                SqlParameter Parameter;

                ENTResponse oENTResponse = new ENTResponse();

                Command = new SqlCommand("spCiudadanos_upd", Connection);
                Command.CommandType = CommandType.StoredProcedure;

                if (iAlternativeTimeOut > 0) { Command.CommandTimeout = iAlternativeTimeOut; }

                Parameter = new SqlParameter("CiudadanoId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.CiudadanoId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("SexoId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.SexoId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("EstadoCivilId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.EstadoCivilId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("ColoniaId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.ColoniaId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("CiudadOrigenId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.CiudadOrigenId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("NacionalidadId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.NacionalidadId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("EscolaridadId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.EscolaridadId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("OcupacionId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.OcupacionId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("MedioComunicacionId", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.MedioComunicacionId;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("Nombre", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.Nombre;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("ApellidoPaterno", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.ApellidoPaterno;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("ApellidoMaterno", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.ApellidoMaterno;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("FechaNacimiento", SqlDbType.DateTime);
                Parameter.Value = oENTCiudadano.FechaNacimiento;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("Calle", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.Calle;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("NumeroExterior", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.NumeroExterior;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("NumeroInterior", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.NumeroInterior;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("TelefonoPrincipal", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.TelefonoPrincipal;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("TelefonoOtro", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.TelefonoOtro;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("CorreoElectronico", SqlDbType.VarChar);
                Parameter.Value = oENTCiudadano.CorreoElectronico;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("AniosResidiendoNL", SqlDbType.TinyInt);
                Parameter.Value = oENTCiudadano.AniosResidiendoNL;
                Command.Parameters.Add(Parameter);

                Parameter = new SqlParameter("DependientesEconomicos", SqlDbType.Int);
                Parameter.Value = oENTCiudadano.DependientesEconomicos;
                Command.Parameters.Add(Parameter);

                oENTResponse.dsResponse = new DataSet();
                DataAdapter = new SqlDataAdapter(Command);

                try
                {
                    Connection.Open();
                    DataAdapter.Fill(oENTResponse.dsResponse);
                    Connection.Close();
                }
                catch (SqlException ex) { oENTResponse.ExceptionRaised(ex.Message); }
                catch (Exception ex) { oENTResponse.ExceptionRaised(ex.Message); }
                finally
                {
                    if (Connection.State == ConnectionState.Open)
                    {
                        Connection.Close();
                    }
                }

                return oENTResponse;
        }
Beispiel #12
0
        ///<remarks>
        ///   <name>DACiudadano.SelectComboSexo</name>
        ///   <create>03/abr/2014</create>
        ///   <author>Jose.Gomez</author>
        ///</remarks>
        ///<summary>Metodo para obtener los sexos del sistema</summary>
        public DataSet SelectComboSexo(ENTCiudadano oENTCiudadano, string ConnectionString)
        {
            SqlConnection Connection = new SqlConnection(ConnectionString);
                SqlCommand Command;
                SqlDataAdapter DataAdapter;
                DataSet ds = new DataSet();

                try
                {
                    Command = new SqlCommand("spcatSexo_SelForControl", Connection);
                    Command.CommandType = CommandType.StoredProcedure;

                    DataAdapter = new SqlDataAdapter(Command);

                    Connection.Open();
                    DataAdapter.Fill(ds);
                    Connection.Close();
                }
                catch (SqlException ex)
                {
                    _ErrorId = ex.Number;
                    _ErrorDescription = ex.Message;
                    if (Connection.State == ConnectionState.Open) { Connection.Close(); }
                }

                return ds;
        }
Beispiel #13
0
        ///<remarks>
        ///   <name>DACiudadano.SelectComboPais</name>
        ///   <create>03/abr/2014</create>
        ///   <author>Jose.Gomez</author>
        ///</remarks>
        ///<summary>Metodo para obtener los países del sistema</summary>
        public ENTResponse SelectComboPais(ENTCiudadano oENTCiudadano, string ConnectionString, int iAlternativeTimeOut)
        {
            SqlConnection Connection = new SqlConnection(ConnectionString);
                SqlCommand Command;
                SqlDataAdapter DataAdapter;

                ENTResponse oENTResponse = new ENTResponse();

                Command = new SqlCommand("spcatPais_SelForControl", Connection);
                Command.CommandType = CommandType.StoredProcedure;

                if (iAlternativeTimeOut > 0) { Command.CommandTimeout = iAlternativeTimeOut; }

                oENTResponse.dsResponse = new DataSet();
                DataAdapter = new SqlDataAdapter(Command);

                try
                {
                    Connection.Open();
                    DataAdapter.Fill(oENTResponse.dsResponse);
                    Connection.Close();
                }
                catch (SqlException ex) { oENTResponse.ExceptionRaised(ex.Message); }
                catch (Exception ex) { oENTResponse.ExceptionRaised(ex.Message); }
                finally
                {
                    if (Connection.State == ConnectionState.Open)
                    {
                        Connection.Close();
                    }
                }

                return oENTResponse;
        }
Beispiel #14
0
        ///<remarks>
        ///   <name>DACiudadano.SelectComboEstado</name>
        ///   <create>03/abr/2014</create>
        ///   <author>Jose.Gomez</author>
        ///</remarks>
        ///<summary>Metodo para obtener los estados del sistema</summary>
        public DataSet SelectComboEstado(ENTCiudadano oENTCiudadano, string ConnectionString)
        {
            SqlConnection Connection = new SqlConnection(ConnectionString);
                SqlCommand Command;
                SqlDataAdapter DataAdapter;
                DataSet ds = new DataSet();
                SqlParameter Parameter;

                try
                {
                    Command = new SqlCommand("spEstado_SelForControl", Connection);
                    Command.CommandType = CommandType.StoredProcedure;

                    Parameter = new SqlParameter("PaisId", SqlDbType.Int);
                    Parameter.Value = oENTCiudadano.PaisId;
                    Command.Parameters.Add(Parameter);

                    DataAdapter = new SqlDataAdapter(Command);

                    Connection.Open();
                    DataAdapter.Fill(ds);
                    Connection.Close();
                }
                catch (SqlException ex)
                {
                    _ErrorId = ex.Number;
                    _ErrorDescription = ex.Message;
                    if (Connection.State == ConnectionState.Open) { Connection.Close(); }
                }

                return ds;
        }
Beispiel #15
0
        ///<remarks>
        ///   <name>DACiudadano.SelectCiudadano_ByID</name>
        ///   <create>06-Julio-2014</create>
        ///   <author>Ruben.Cobos</author>
        ///</remarks>
        ///<summary>Consulta un ciudadano por su ID único</summary>
        ///<param name="oENTCiudadano">Entidad de Ciudadano con los parámetros necesarios para crear la relación</param>
        ///<param name="sConnection">Cadena de conexión a la base de datos</param>
        ///<param name="iAlternateDBTimeout">Valor en milisegundos del Timeout en la consulta a la base de datos. 0 si se desea el Timeout por default</param>
        ///<returns>Una entidad de respuesta</returns>
        public ENTResponse SelectCiudadano_ByID(ENTCiudadano oENTCiudadano, String sConnection, Int32 iAlternateDBTimeout)
        {
            SqlConnection sqlCnn = new SqlConnection(sConnection);
            SqlCommand sqlCom;
            SqlParameter sqlPar;
            SqlDataAdapter sqlDA;

            ENTResponse oENTResponse = new ENTResponse();

            // Configuración de objetos
            sqlCom = new SqlCommand("uspCiudadano_Sel_ByID", sqlCnn);
            sqlCom.CommandType = CommandType.StoredProcedure;

            // Timeout alternativo en caso de ser solicitado
            if (iAlternateDBTimeout > 0) { sqlCom.CommandTimeout = iAlternateDBTimeout; }

            // Parametros
            sqlPar = new SqlParameter("CiudadanoId", SqlDbType.Int);
            sqlPar.Value = oENTCiudadano.CiudadanoId;
            sqlCom.Parameters.Add(sqlPar);

            // Inicializaciones
            oENTResponse.dsResponse = new DataSet();
            sqlDA = new SqlDataAdapter(sqlCom);

            // Transacción
            try{
                sqlCnn.Open();
                sqlDA.Fill(oENTResponse.dsResponse);
                sqlCnn.Close();
            }catch (SqlException sqlEx){
                oENTResponse.ExceptionRaised(sqlEx.Message);
            }catch (Exception ex){
                oENTResponse.ExceptionRaised(ex.Message);
            }finally{
                if (sqlCnn.State == ConnectionState.Open) { sqlCnn.Close(); }
                sqlCnn.Dispose();
            }

            // Resultado
            return oENTResponse;
        }
        // Rutinas del programador
        void SelectCiudadanoDetalle()
        {
            BPCiudadano BPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {

                // Formulario
                oENTCiudadano.CiudadanoId = Int32.Parse(this.hddCiudadanoId.Value);

                // Transacción
                oENTResponse = BPCiudadano.SelectCiudadano_ByID(oENTCiudadano);

                // Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Detalle del ciudadano
                this.lblNombre.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Nombre"].ToString();
                this.lblApellidoPaterno.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["ApellidoPaterno"].ToString();
                this.lblApellidoMaterno.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["ApellidoMaterno"].ToString();
                this.lblSexo.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["SexoNombre"].ToString();
                this.lblEdad.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Edad"].ToString().Split(new Char[] { ' ' })[0];
                this.lblNacionalidad.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NacionalidadNombre"].ToString();
                this.lblOcupacion.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["OcupacionNombre"].ToString();
                this.lblEscolaridad.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["EscolaridadNombre"].ToString();
                this.lblEstadoCivil.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["EstadoCivilNombre"].ToString();
                this.lblTelefonoPrincipal.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["TelefonoPrincipal"].ToString();
                this.lblOtroTelefono.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["TelefonoOtro"].ToString();
                this.lblCorreoElectronico.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["CorreoElectronico"].ToString();
                this.lblDependientesEconomicos.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["DependientesEconomicos"].ToString();
                this.lblFormaEnterarse.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["MedioComunicacionNombre"].ToString();
                this.lblPais.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NombrePais"].ToString();
                this.lblEstado.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NombreEstado"].ToString();
                this.lblCiudad.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NombreCiudad"].ToString();
                this.lblColonia.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NombreColonia"].ToString();
                this.lblCalle.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Calle"].ToString();
                this.lblNoExterior.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NumeroExterior"].ToString();
                this.lblNumInterior.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NumeroInterior"].ToString();
                this.lblAniosResidiendoNL.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["AniosResidiendoNL"].ToString();

                // Solicitudes y Expedientes
                this.gvSolicitudes.DataSource = oENTResponse.dsResponse.Tables[2];
                this.gvSolicitudes.DataBind();

                // Visitas
                this.gvVisitas.DataSource = oENTResponse.dsResponse.Tables[3];
                this.gvVisitas.DataBind();

            }catch (Exception ex){
                throw (ex);
            }
        }
        void SelectCiudadanoByID(String CiudadanoId)
        {
            BPCiudadano BPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {

                // Formulario
                oENTCiudadano.CiudadanoId = Int32.Parse(CiudadanoId);

                // Transacción
                oENTResponse = BPCiudadano.SelectCiudadano_ByID(oENTCiudadano);

                // Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Cargar el Autosuggest de Búsqueda de ciudadano
                this.txtCiudadano.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NombreCompleto"].ToString();
                this.hddCiudadanoId.Value = oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadanoId"].ToString();

            }catch (Exception ex){
                throw (ex);
            }
        }
Beispiel #18
0
 ///<remarks>
 ///   <name>BPCiudadano.searchCiudadanoAtencionSel</name>
 ///   <create>11/jun/2014</create>
 ///   <author>JJ</author>
 ///</remarks>
 ///<summary>Metodo para obtener las Ciudadanos que esten en una atención</summary>
 public ENTResponse searchCiudadanoAtencion(ENTCiudadano entCiudadano)
 {
     ENTResponse oENTResponse = new ENTResponse();
         try
         {
             // Consulta a base de datos
             DACiudadano dataCiudadano = new DACiudadano();
             oENTResponse = dataCiudadano.searchCiudadanoAtencion(entCiudadano);
             // Validación de error en consulta
             if (oENTResponse.GeneratesException) { return oENTResponse; }
             // Validación de mensajes de la BD
             oENTResponse.sMessage = oENTResponse.dsResponse.Tables[0].Rows[0]["sResponse"].ToString();
             if (oENTResponse.sMessage != "") { return oENTResponse; }
         }
         catch (Exception ex)
         {
             oENTResponse.ExceptionRaised(ex.Message);
         }
         // Resultado
         return oENTResponse;
 }
        void SelectPais()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {

                // Transacción
                oENTResponse = oBPCiudadano.SelectComboPais(oENTCiudadano);

                // Validaciones
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Llenado de control
                this.ddlPais.DataSource = oENTResponse.dsResponse.Tables[1];
                this.ddlPais.DataTextField = "Nombre";
                this.ddlPais.DataValueField = "PaisId";
                this.ddlPais.DataBind();

                this.ddlPais.Items.Insert(0, new ListItem("[Seleccione]", "0"));

            }catch (Exception ex){
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(ex.Message) + "');", true);
            }
        }
Beispiel #20
0
        ///<remarks>
        ///   <name>BPCiudadano.SelectCiudadano_ByID</name>
        ///   <create>06-Julio-2014</create>
        ///   <author>Ruben.Cobos</author>
        ///</remarks>
        ///<summary>Consulta un ciudadano por su ID único</summary>
        ///<param name="oENTCiudadano">Entidad de Ciudadano con los parámetros necesarios para realizar la transacción</param>
        ///<returns>Una entidad de respuesta</returns>
        public ENTResponse SelectCiudadano_ByID(ENTCiudadano oENTCiudadano)
        {
            DACiudadano oDACiudadano = new DACiudadano();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Transacción en base de datos
                oENTResponse = oDACiudadano.SelectCiudadano_ByID(oENTCiudadano, this.sConnectionApplication, 0);

                // Validación de error en consulta
                if (oENTResponse.GeneratesException) { return oENTResponse; }

                // Validación de mensajes de la BD
                oENTResponse.sMessage = oENTResponse.dsResponse.Tables[0].Rows[0]["sResponse"].ToString();
                if (oENTResponse.sMessage != "") { return oENTResponse; }

            }catch (Exception ex){
                oENTResponse.ExceptionRaised(ex.Message);
            }

            // Resultado
            return oENTResponse;
        }
        void ModificarCiudadano(int CiudadanoId)
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            DateTime dtFechaNacimiento;

            try
            {

                //Validaciones
                ValidateForm();

                // Obtener fecha de nacimiento del ciudadano
                dtFechaNacimiento = DateTime.Now;
                dtFechaNacimiento = dtFechaNacimiento.AddYears(Int32.Parse(this.txtEdad.Text.Trim()) * -1);

                //Asignación de parametros
                //Info general
                oENTCiudadano.CiudadanoId = CiudadanoId;
                oENTCiudadano.Nombre = txtNombre.Text;
                oENTCiudadano.ApellidoPaterno = txtApellidoPaterno.Text;
                oENTCiudadano.ApellidoMaterno = txtApellidoMaterno.Text;
                oENTCiudadano.SexoId = Convert.ToInt32(ddlSexo.SelectedValue);
                oENTCiudadano.FechaNacimiento = dtFechaNacimiento;
                oENTCiudadano.NacionalidadId = Convert.ToInt32(ddlNacionalidad.SelectedValue);
                oENTCiudadano.OcupacionId = Convert.ToInt32(ddlOcupacion.SelectedValue);
                oENTCiudadano.EscolaridadId = Convert.ToInt32(ddlEscolaridad.SelectedValue);
                oENTCiudadano.EstadoCivilId = Convert.ToInt32(ddlEstadoCivil.SelectedValue);
                oENTCiudadano.TelefonoPrincipal = txtTelefonoPrincipal.Text;
                oENTCiudadano.TelefonoOtro = txtOtroTelefono.Text;
                oENTCiudadano.CorreoElectronico = txtCorreoElectronico.Text;
                oENTCiudadano.DependientesEconomicos = (String.IsNullOrEmpty(txtDependientesEconomicos.Text) ? Convert.ToByte(0) : Convert.ToByte(txtDependientesEconomicos.Text));
                oENTCiudadano.MedioComunicacionId = Convert.ToInt32(ddlMedioComunicacion.SelectedValue);

                //Domicilio
                oENTCiudadano.PaisId = Convert.ToInt32(ddlPais.SelectedValue);
                oENTCiudadano.EstadoId = Convert.ToInt32(ddlEstado.SelectedValue);
                oENTCiudadano.CiudadId = Convert.ToInt32(ddlCiudad.SelectedValue);
                oENTCiudadano.ColoniaId = Convert.ToInt32(ddlColonia.SelectedValue);
                oENTCiudadano.Calle = txtNombreCalle.Text;
                oENTCiudadano.NumeroExterior = txtNumExterior.Text;
                oENTCiudadano.NumeroInterior = txtNumInterior.Text;
                oENTCiudadano.AniosResidiendoNL = (String.IsNullOrEmpty(txtAniosResidiendo.Text) ? Convert.ToByte(0) : Convert.ToByte(txtAniosResidiendo.Text));

                //Info de origen
                oENTCiudadano.PaisOrigenId = Convert.ToInt32(ddlPaisOrigen.SelectedValue);
                oENTCiudadano.EstadoOrigenId = Convert.ToInt32(ddlEstadoOrigen.SelectedValue);
                oENTCiudadano.CiudadOrigenId = Convert.ToInt32(ddlCiudadOrigen.SelectedValue);

                //Transacción
                oENTResponse = oBPCiudadano.UpdateCiudadano(oENTCiudadano);

                //Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

            }catch (Exception ex){
                throw (ex);
            }
        }
Beispiel #22
0
 public BPCiudadano()
 {
     _ErrorId = 0;
         _ErrorDescription = "";
         _ENTCiudadano = new ENTCiudadano();
 }
        // Rutinas del programador
        void AgregarCiudadano()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTResponse oENTResponse = new ENTResponse();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            DateTime dtFechaNacimiento;

            try
            {

                //Validaciones
                ValidateForm();

                // Obtener fecha de nacimiento del ciudadano
                dtFechaNacimiento = DateTime.Now;
                dtFechaNacimiento = dtFechaNacimiento.AddYears(Int32.Parse(this.txtEdad.Text.Trim()) * -1);

                //Asignación de parametros
                //Info general
                oENTCiudadano.Nombre = txtNombre.Text;
                oENTCiudadano.ApellidoPaterno = txtApellidoPaterno.Text;
                oENTCiudadano.ApellidoMaterno = txtApellidoMaterno.Text;
                oENTCiudadano.SexoId = Convert.ToInt32(ddlSexo.SelectedValue);
                oENTCiudadano.FechaNacimiento = dtFechaNacimiento;
                oENTCiudadano.NacionalidadId = Convert.ToInt32(ddlNacionalidad.SelectedValue);
                oENTCiudadano.OcupacionId = Convert.ToInt32(ddlOcupacion.SelectedValue);
                oENTCiudadano.EscolaridadId = Convert.ToInt32(ddlEscolaridad.SelectedValue);
                oENTCiudadano.EstadoCivilId = Convert.ToInt32(ddlEstadoCivil.SelectedValue);
                oENTCiudadano.TelefonoPrincipal = txtTelefonoPrincipal.Text;
                oENTCiudadano.TelefonoOtro = txtOtroTelefono.Text;
                oENTCiudadano.CorreoElectronico = txtCorreoElectronico.Text;
                oENTCiudadano.DependientesEconomicos = (String.IsNullOrEmpty(txtDependientesEconomicos.Text) ? Convert.ToByte(0) : Convert.ToByte(txtDependientesEconomicos.Text) );
                oENTCiudadano.MedioComunicacionId = Convert.ToInt32(ddlMedioComunicacion.SelectedValue);

                //Domicilio
                oENTCiudadano.PaisId = Convert.ToInt32(ddlPais.SelectedValue);
                oENTCiudadano.EstadoId = Convert.ToInt32(ddlEstado.SelectedValue);
                oENTCiudadano.CiudadId = Convert.ToInt32(ddlCiudad.SelectedValue);
                oENTCiudadano.ColoniaId = Convert.ToInt32(ddlColonia.SelectedValue);
                oENTCiudadano.Calle = txtNombreCalle.Text;
                oENTCiudadano.NumeroExterior = txtNumExterior.Text;
                oENTCiudadano.NumeroInterior = txtNumInterior.Text;
                oENTCiudadano.AniosResidiendoNL = (String.IsNullOrEmpty(txtAniosResidiendo.Text) ? Convert.ToByte(0) : Convert.ToByte(txtAniosResidiendo.Text));

                //Info de origen
                oENTCiudadano.PaisOrigenId = Convert.ToInt32(ddlPaisOrigen.SelectedValue);
                oENTCiudadano.EstadoOrigenId = Convert.ToInt32(ddlEstadoOrigen.SelectedValue);
                oENTCiudadano.CiudadOrigenId = Convert.ToInt32(ddlCiudadOrigen.SelectedValue);

                //Transacción
                oENTResponse = oBPCiudadano.InsertCiudadano(oENTCiudadano);

                //Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Determinar de donde fue enviada la petición
                if (this.hddSolicitudId.Value != ""){

                    Response.Redirect("../Quejas/QueAgregarCiudadanos.aspx?key=" + this.hddSolicitudId.Value + "|" + this.SenderId.Value + "|" + oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadanoId"].ToString(), false);
                }else{

                    if (this.hddExpedienteId.Value != ""){

                        RedirectVisitadurias(oENTResponse.dsResponse.Tables[1].Rows[0]["CiudadanoId"].ToString());
                    }else {

                        Limpiar();
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('Ciudadano agregado con éxito');", true);

                    }

                }

            }catch (Exception ex){
                throw (ex);
            }
        }
Beispiel #24
0
        /// <summary>
        /// Inserta ciudadanos en el sistema
        /// </summary>
        public ENTResponse InsertCiudadano(ENTCiudadano oENTCiudadano)
        {
            DACiudadano oDACiudadano = new DACiudadano();
                ENTResponse oENTResponse = new ENTResponse();

                try
                {
                    oENTResponse = oDACiudadano.InsertCiudadano(oENTCiudadano, sConnectionApplication, 0);
                    if (oENTResponse.GeneratesException) { return oENTResponse; }
                    oENTResponse.sMessage = String.Empty;
                    oENTResponse.sMessage = oENTResponse.dsResponse.Tables[0].Rows[0]["sResponse"].ToString();
                    if (oENTResponse.sMessage != "") { return oENTResponse; }
                }
                catch (Exception ex)
                {
                    oENTResponse.ExceptionRaised(ex.Message);
                }

                return oENTResponse;
        }
        private void ComboOcupacion()
        {
            BPCiudadano oBPCiudadano = new BPCiudadano();
            ENTCiudadano oENTCiudadano = new ENTCiudadano();

            try
            {
                oBPCiudadano.SelectComboOcupacion();

                if (oBPCiudadano.ErrorId == 0)
                {
                    if (oBPCiudadano.ENTCiudadano.ResultData.Tables[0].Rows.Count > 0)
                    {
                        ddlOcupacion.DataSource = oBPCiudadano.ENTCiudadano.ResultData;
                        ddlOcupacion.DataTextField = "Nombre";
                        ddlOcupacion.DataValueField = "OcupacionId";
                        ddlOcupacion.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page
                    , this.GetType()
                    , Convert.ToString(Guid.NewGuid())
                    , "alert('" + gcJavascript.ClearText(ex.Message) + "');"
                    , true);
            }
        }
Beispiel #26
0
 ///<remarks>
 ///   <name>DACiudadano.searchCiudadano</name>
 ///   <create>27/ene/2014</create>
 ///   <author>Generador</author>
 ///</remarks>
 ///<summary>Metodo para obtener las Ciudadano del sistema</summary>
 public ENTResponse searchCiudadanoAtencion(ENTCiudadano entCiudadano)
 {
     ENTResponse oENTResponse = new ENTResponse();
         DataSet ds = new DataSet();
         // Transacción
         try
         {
             ds = dbs.ExecuteDataSet("uspSearchCiudadanoAtencionSel", entCiudadano.AtencionId);
             oENTResponse.dsResponse = ds;
         }
         catch (SqlException sqlEx)
         {
             oENTResponse.ExceptionRaised(sqlEx.Message);
         }
         catch (Exception ex)
         {
             oENTResponse.ExceptionRaised(ex.Message);
         }
         finally
         {
         }
         // Resultado
         return oENTResponse;
 }