Exemple #1
0
        //Funcion que regresa una Prelacion segun el ID.
        public static Prelacion ObtenerPrelacionPorId(int idPrelacion)
        {
            Prelacion     pre = new Prelacion();
            SqlConnection con = new SqlConnection(Connection.getConnection());

            con.Open();
            SqlCommand comm = new SqlCommand("select * from Prelaciones inner join PrelacionesUsuarios on Prelaciones.id_prelacion=PrelacionesUsuarios.id_prelacion " +
                                             " inner join Tramitantes on Prelaciones.id_tramitante=Tramitantes.id_tramitante where Prelaciones.id_prelacion='" + idPrelacion + "'", con);
            SqlDataReader reader = comm.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    pre.IdPrelacion              = int.Parse(reader["id_prelacion"].ToString());
                    pre.idUsuario                = reader["id_usuario"].ToString();
                    pre.NombreTitular            = reader["nombre_titular"].ToString();
                    pre.DescripcionBien          = reader["descripcion_bien"].ToString();
                    pre.NumeroEscritura          = reader["numero_escritura"].ToString();
                    pre.Folio                    = reader["folio"].ToString();
                    pre.Total                    = Convert.ToDecimal(reader["total"].ToString());
                    pre.Fecha                    = reader["fecha"].ToString();
                    pre.IdTramitante             = int.Parse(reader["id_tramitante"].ToString());
                    pre.Tramitante               = reader["nombre"].ToString() + " " + reader["apellido_paterno"].ToString() + " " + reader["apellido_materno"].ToString();
                    pre.ObservacionesVerificador = reader["observaciones_verificador"].ToString();
                }
            }
            con.Close();
            return(pre);
        }
Exemple #2
0
        public List <Prelacion> ObtenerPrelacionesUsuario(int idusuario, String estado)
        {
            List <Prelacion> listaPrelaciones = new List <Prelacion>();
            SqlConnection    con = new SqlConnection(Connection.getConnection());

            con.Open();
            SqlCommand    comm   = new SqlCommand("select * from Prelaciones left join PrelacionesUsuarios on Prelaciones.id_prelacion=PrelacionesUsuarios.id_prelacion left join Usuarios on Usuarios.id_usuario=PrelacionesUsuarios.id_usuario where Prelaciones.estatus='" + estado + "' and PrelacionesUsuarios.id_usuario='" + idusuario + "' order by Prelaciones.id_prelacion", con);
            SqlDataReader reader = comm.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    Prelacion pre = new Prelacion();
                    pre.IdPrelacion              = int.Parse(reader["id_prelacion"].ToString());
                    pre.idUsuario                = reader["id_usuario"].ToString();
                    pre.Usuario                  = reader["nombre"].ToString() + " " + reader["apellido_paterno"].ToString() + " " + reader["apellido_materno"].ToString();
                    pre.NombreTitular            = reader["nombre_titular"].ToString();
                    pre.DescripcionBien          = reader["descripcion_bien"].ToString();
                    pre.ObservacionesVerificador = reader["observaciones_verificador"].ToString();
                    listaPrelaciones.Add(pre);
                }
            }
            con.Close();

            return(listaPrelaciones);
        }
Exemple #3
0
        public List <Prelacion> ObtenerPrelacionesActo(int IdActo)
        {
            List <Prelacion> listaPrelaciones = new List <Prelacion>();

            SqlConnection con = new SqlConnection(Connection.getConnection());

            con.Open();
            SqlCommand    comm   = new SqlCommand("select Usuarios.nombre as Unombre, Usuarios.apellido_paterno as Upaterno, Usuarios.apellido_materno as Umaterno,* from Prelaciones inner join Tramitantes on Prelaciones.id_tramitante=Tramitantes.id_tramitante left join PrelacionesUsuarios on Prelaciones.id_prelacion=PrelacionesUsuarios.id_prelacion left join Usuarios on Usuarios.id_usuario=PrelacionesUsuarios.id_usuario INNER JOIN PrelacionesActos ON PrelacionesActos.id_prelacion = Prelaciones.id_prelacion where PrelacionesActos.id_acto = " + IdActo + " order by PrelacionesUsuarios.id_usuario,Prelaciones.id_prelacion", con);
            SqlDataReader reader = comm.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    Prelacion pre = new Prelacion();
                    pre.IdPrelacion       = int.Parse(reader["id_prelacion"].ToString());
                    pre.idUsuario         = reader["id_usuario"].ToString();
                    pre.Usuario           = reader["Unombre"].ToString() + " " + reader["Upaterno"].ToString() + " " + reader["Umaterno"].ToString();
                    pre.NombreTitular     = reader["nombre_titular"].ToString();
                    pre.DescripcionBien   = reader["descripcion_bien"].ToString();
                    pre.Fecha             = reader["fecha"].ToString();
                    pre.FechaDocumento    = reader["fecha_documento"].ToString();
                    pre.LugarOtorgamiento = reader["lugar_otorgamiento"].ToString();
                    pre.TipoDocumento     = reader["tipo_documento"].ToString();
                    pre.TipoMoneda        = reader["tipo_moneda"].ToString();
                    pre.IdTramitante      = int.Parse(reader["id_tramitante"].ToString());
                    pre.Tramitante        = reader["nombre"].ToString() + " " + reader["apellido_paterno"].ToString() + " " + reader["apellido_materno"].ToString();
                    pre.NumeroEscritura   = reader["numero_escritura"].ToString();
                    listaPrelaciones.Add(pre);
                }
            }
            con.Close();
            return(listaPrelaciones);
        }
Exemple #4
0
        public static List <Prelacion> ObtenerPrelacionesEstatusFechaReporteRango(String estatus, String fechaInicio, String fechaFin)
        {
            List <Prelacion> listaPrelaciones = new List <Prelacion>();

            SqlConnection con = new SqlConnection(Connection.getConnection());

            con.Open();
            SqlCommand comm = new SqlCommand("select Usuarios.nombre as Unombre, Usuarios.apellido_paterno as Upaterno, Usuarios.apellido_materno as Umaterno, *, Actos.nombre as nombreActo " +
                                             "from Prelaciones " +
                                             "JOIN PrelacionesUsuarios on Prelaciones.id_prelacion=PrelacionesUsuarios.id_prelacion " +
                                             "JOIN Usuarios on Usuarios.id_usuario=PrelacionesUsuarios.id_usuario " +
                                             "JOIN PrelacionesActos ON PrelacionesActos.id_prelacion = Prelaciones.id_prelacion " +
                                             "JOIN Actos ON Actos.clave_acto = PrelacionesActos.id_acto " +
                                             "where Prelaciones.estatus LIKE '" + estatus + "' AND (Cast(Prelaciones.fecha_asignacion As Date) >= '" + fechaInicio + "' And Cast(Prelaciones.fecha_asignacion As Date) <= '" + fechaFin + "') " +
                                             "order by PrelacionesUsuarios.id_usuario, Actos.id_acto, Prelaciones.id_prelacion", con);
            SqlDataReader reader = comm.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    Prelacion pre = new Prelacion();
                    pre.IdPrelacion     = int.Parse(reader["id_prelacion"].ToString());
                    pre.NombreActo      = reader["nombreActo"].ToString();
                    pre.Usuario         = reader["Unombre"].ToString() + " " + reader["Upaterno"].ToString() + " " + reader["Umaterno"].ToString();
                    pre.FechaAsignacion = reader["fecha_asignacion"].ToString();
                    pre.NumeroEscritura = reader["numero_escritura"].ToString();
                    pre.Status          = reader["estatus"].ToString();
                    listaPrelaciones.Add(pre);
                }
            }
            con.Close();
            return(listaPrelaciones);
        }
Exemple #5
0
        public static void ActualizarPrelacion(Prelacion p)
        {
            SqlConnection con = new SqlConnection(Connection.getConnection());

            con.Open();
            SqlCommand comm = new SqlCommand("UPDATE Prelaciones " +
                                             "SET nombre_titular = '" + p.NombreTitular + "', descripcion_bien = '" + p.DescripcionBien + "', numero_escritura = '" + p.NumeroEscritura + "', lugar_otorgamiento = '" + p.LugarOtorgamiento + "', tipo_documento = '" + p.TipoDocumento + "', fecha_documento = '" + p.FechaDocumento + "', folio = '" + p.Folio + "', id_tramitante = " + p.IdTramitante + " " +
                                             "WHERE id_prelacion = " + p.IdPrelacion, con);

            comm.ExecuteNonQuery();

            comm = new SqlCommand("DELETE FROM PrelacionesAntecedentes " +
                                  "WHERE id_prelacion = " + p.IdPrelacion, con);

            comm.ExecuteNonQuery();

            if (p.antecedentes != null)
            {
                foreach (Antecedente item in p.antecedentes)
                {
                    int res = p.GuardarAntecedentesPrelacion(p.IdPrelacion, item.Libro, item.Tomo, item.Semestre, item.Seccion, item.Serie, item.Partida, item.Año, item.Folio);
                }
            }

            con.Close();
        }
Exemple #6
0
        //Función para la búsqueda de una prelación en el módulo de modificación de prelación de recepción
        public static Prelacion ObtenerPrelacionPorIdBusqueda(int idPrelacion)
        {
            Prelacion     pre = new Prelacion();
            SqlConnection con = new SqlConnection(Connection.getConnection());

            con.Open();
            SqlCommand comm = new SqlCommand("SELECT * FROM Prelaciones " +
                                             "INNER JOIN Tramitantes ON Prelaciones.id_tramitante = Tramitantes.id_tramitante " +
                                             "WHERE Prelaciones.id_prelacion = '" + idPrelacion + "' AND Prelaciones.estatus LIKE '%'", con);
            SqlDataReader reader = comm.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    pre.IdPrelacion = int.Parse(reader["id_prelacion"].ToString());

                    pre.Folio             = reader["folio"].ToString();
                    pre.IdTramitante      = int.Parse(reader["id_tramitante"].ToString());
                    pre.Tramitante        = reader["nombre"].ToString() + " " + reader["apellido_paterno"].ToString() + " " + reader["apellido_materno"].ToString();
                    pre.NombreTitular     = reader["nombre_titular"].ToString();
                    pre.NumeroEscritura   = reader["numero_escritura"].ToString();
                    pre.DescripcionBien   = reader["descripcion_bien"].ToString();
                    pre.TipoDocumento     = reader["tipo_documento"].ToString();
                    pre.FechaDocumento    = reader["fecha_documento"].ToString();
                    pre.LugarOtorgamiento = reader["lugar_otorgamiento"].ToString();

                    pre.antecedentes = new List <Antecedente>();
                    pre.antecedentes = Prelacion.ObtenerAntecedentesPrelacion(idPrelacion);
                }
            }
            con.Close();
            return(pre);
        }
Exemple #7
0
        public static String GuardarPrelacionObjeto(Prelacion prelacion)
        {
            SqlConnection con = new SqlConnection(Connection.getConnection());

            con.Open();
            int idPre = 0;

            using (SqlTransaction transaction = con.BeginTransaction())
            {
                try
                {
                    idPre = prelacion.GuardarNueva(prelacion.idTramitante, prelacion.NombreTitular, prelacion.DescripcionBien, prelacion.NumeroEscritura, prelacion.ValorInmueble, prelacion.Folio, prelacion.Total, prelacion.Status, prelacion.Fecha, prelacion.LugarOtorgamiento, prelacion.TipoDocumento, prelacion.TipoMoneda, prelacion.FechaDocumento);
                    if (idPre == 0)
                    {
                        throw new Exception();
                    }

                    foreach (Movimientos item in prelacion.actosprelacion)
                    {
                        int res = prelacion.GuardarActosPrelacion(idPre, item.ClaveActo, item.Clave, item.Importe);
                        if (res != 0)
                        {
                            throw new Exception();
                        }
                    }

                    foreach (Antecedente item in prelacion.antecedentes)
                    {
                        int res = prelacion.GuardarAntecedentesPrelacion(idPre, item.Libro, item.Tomo, item.Semestre, item.Seccion, item.Serie, item.Partida, item.Año, item.Folio);
                        if (res != 0)
                        {
                            throw new Exception();
                        }
                    }
                    transaction.Commit();
                    con.Close();
                }
                catch (Exception exc)
                {
                    transaction.Rollback();
                    return("ERROR: " + exc.Message);
                }
            }
            return(idPre.ToString());
        }
Exemple #8
0
        public static string CrearCompendio(Prelacion prelacion)
        {
            try
            {
                List <Movimientos>  actos        = new List <Movimientos>();
                List <Antecedente>  antecedentes = new List <Antecedente>();
                List <RegistroActo> registros    = new List <RegistroActo>();
                List <Antecedente>  anotaciones  = new List <Antecedente>();

                string actosString     = "";
                string an_reg_libro    = "";
                string an_reg_tomo     = "";
                string an_reg_semestre = "";
                string an_reg_anio     = "";
                string an_reg_seccion  = "";
                string an_reg_serie    = "";
                string an_reg_partida  = "";

                string otorgantes   = "";
                string adquirientes = "";

                string an_marg_observaciones = "";
                string an_marg_libro         = "";
                string an_marg_tomo          = "";
                string an_marg_semestre      = "";
                string an_marg_anio          = "";
                string an_marg_seccion       = "";
                string an_marg_serie         = "";
                string an_marg_partida       = "";

                string tipoPredio       = "";
                string superficie       = "";
                string unidadSuperficie = "";
                string descripcion      = "";
                string municipio        = "";
                string poblacion        = "";
                string claveCatastral   = "";
                string norte            = "";
                string sur              = "";
                string este             = "";
                string oeste            = "";
                string noreste          = "";
                string noroeste         = "";
                string sureste          = "";
                string suroeste         = "";
                string fechaRegistro    = "";
                string reg_act_libro    = "";
                string reg_act_tomo     = "";
                string reg_act_semestre = "";
                string reg_act_anio     = "";
                string reg_act_seccion  = "";
                string reg_act_serie    = "";
                string reg_act_partida  = "";
                string inegiEstado      = "";
                string inegiMunicipio   = "";
                string inegiPoblacion   = "";
                string inegiColonia     = "";
                string inegiCalle       = "";
                string inegiNumeroCalle = "";


                bool flag = true;

                actos        = Prelacion.ObtenerMovimientosPrelacion(prelacion.IdPrelacion, "");
                antecedentes = Prelacion.ObtenerAntecedentesPrelacion(prelacion.IdPrelacion);
                registros    = RegistroActo.ObtenerDatosListaRegistrosPrelacion(prelacion.IdPrelacion);


                foreach (Movimientos item in actos)
                {
                    if (flag)
                    {
                        actosString = actosString + item.NombreActo;
                        flag        = false;
                    }
                    else
                    {
                        actosString = actosString + "|" + item.NombreActo;
                    }
                }
                flag = true;
                foreach (Antecedente item in antecedentes)
                {
                    if (flag)
                    {
                        an_reg_libro    = an_reg_libro + item.Libro;
                        an_reg_tomo     = an_reg_tomo + item.Tomo;
                        an_reg_semestre = an_reg_semestre + item.Semestre;
                        an_reg_anio     = an_reg_anio + item.Año;
                        an_reg_seccion  = an_reg_seccion + item.Seccion;
                        an_reg_serie    = an_reg_serie + item.Serie;
                        an_reg_partida  = an_reg_partida + item.Partida;
                        flag            = false;
                    }
                    else
                    {
                        an_reg_libro    = an_reg_libro + "|" + item.Libro;
                        an_reg_tomo     = an_reg_tomo + "|" + item.Tomo;
                        an_reg_semestre = an_reg_semestre + "|" + item.Semestre;
                        an_reg_anio     = an_reg_anio + "|" + item.Año;
                        an_reg_seccion  = an_reg_seccion + "|" + item.Seccion;
                        an_reg_serie    = an_reg_serie + "|" + item.Serie;
                        an_reg_partida  = an_reg_partida + "|" + item.Partida;
                    }
                }
                flag = true;
                foreach (RegistroActo item in registros)
                {
                    RegistroActo temp = RegistroActo.ObtenerDatosRegistro(item.IdRegistro);

                    if (temp != null)
                    {
                        if (temp.Otorgantes != null)
                        {
                            foreach (Persona otorgante in temp.Otorgantes)
                            {
                                if (otorgantes.Length > 0)
                                {
                                    otorgantes = otorgantes + "|" + otorgante.Nombre;
                                }
                                else
                                {
                                    otorgantes = otorgante.Nombre;
                                }
                            }
                        }
                        if (temp.Adquirientes != null)
                        {
                            foreach (Persona adquiriente in temp.Adquirientes)
                            {
                                if (adquirientes.Length > 0)
                                {
                                    adquirientes = adquirientes + "|" + adquiriente.Nombre;
                                }
                                else
                                {
                                    adquirientes = adquiriente.Nombre;
                                }
                            }
                        }
                        if (temp.AnotacionesMarginales != null)
                        {
                            foreach (Antecedente anotacion in temp.AnotacionesMarginales)
                            {
                                if (anotacion != null)
                                {
                                    if (an_marg_observaciones.Length > 0)
                                    {
                                        an_marg_observaciones = an_marg_observaciones + "|" + anotacion.Observaciones;
                                    }
                                    else
                                    {
                                        an_marg_observaciones = an_marg_observaciones + anotacion.Observaciones;
                                    }

                                    if (an_marg_libro.Length > 0)
                                    {
                                        an_marg_libro = an_marg_libro + "|" + anotacion.Libro;
                                    }
                                    else
                                    {
                                        an_marg_libro = an_marg_libro + anotacion.Libro;
                                    }

                                    if (an_marg_tomo.Length > 0)
                                    {
                                        an_marg_tomo = an_marg_tomo + "|" + anotacion.Tomo;
                                    }
                                    else
                                    {
                                        an_marg_tomo = an_marg_tomo + anotacion.Tomo;
                                    }

                                    if (an_marg_semestre.Length > 0)
                                    {
                                        an_marg_semestre = an_marg_semestre + "|" + anotacion.Semestre;
                                    }
                                    else
                                    {
                                        an_marg_semestre = an_marg_semestre + anotacion.Semestre;
                                    }

                                    if (an_marg_anio.Length > 0)
                                    {
                                        an_marg_anio = an_marg_anio + "|" + anotacion.Año;
                                    }
                                    else
                                    {
                                        an_marg_anio = an_marg_anio + anotacion.Año;
                                    }

                                    if (an_marg_seccion.Length > 0)
                                    {
                                        an_marg_seccion = an_marg_seccion + "|" + anotacion.Seccion;
                                    }
                                    else
                                    {
                                        an_marg_seccion = an_marg_seccion + anotacion.Seccion;
                                    }

                                    if (an_marg_serie.Length > 0)
                                    {
                                        an_marg_serie = an_marg_serie + "|" + anotacion.Serie;
                                    }
                                    else
                                    {
                                        an_marg_serie = an_marg_serie + anotacion.Serie;
                                    }

                                    if (an_marg_partida.Length > 0)
                                    {
                                        an_marg_partida = an_marg_partida + "|" + anotacion.Partida;
                                    }
                                    else
                                    {
                                        an_marg_partida = an_marg_partida + anotacion.Partida;
                                    }
                                }
                            }
                        }

                        tipoPredio       = tipoPredio.Length > 0 ? tipoPredio + "|" + item.TipoPredio : item.TipoPredio;
                        superficie       = superficie.Length > 0 ? superficie + "|" + item.Superficie : item.Superficie;
                        unidadSuperficie = unidadSuperficie.Length > 0 ? unidadSuperficie + "|" + item.UnidadSuperficie : item.UnidadSuperficie;

                        municipio        = municipio.Length > 0 ? municipio + "|" + item.MunicipioTexto : item.MunicipioTexto;
                        poblacion        = poblacion.Length > 0 ? poblacion + "|" + item.PoblacionTexto : item.PoblacionTexto;
                        claveCatastral   = claveCatastral.Length > 0 ? claveCatastral + "|" + item.ClaveCatastral : item.ClaveCatastral;
                        norte            = norte.Length > 0 ? norte + "|" + item.Norte : item.Norte;
                        sur              = sur.Length > 0 ? sur + "|" + item.Sur : item.Sur;
                        este             = este.Length > 0 ? este + "|" + item.Este : item.Este;
                        oeste            = oeste.Length > 0 ? oeste + "|" + item.Oeste : item.Oeste;
                        noreste          = noreste.Length > 0 ? noreste + "|" + item.Noreste : item.Noreste;
                        noroeste         = noroeste.Length > 0 ? noroeste + "|" + item.Noroeste : item.Noroeste;
                        sureste          = sureste.Length > 0 ? sureste + "|" + item.Sureste : item.Sureste;
                        suroeste         = suroeste.Length > 0 ? suroeste + "|" + item.Suroeste : item.Suroeste;
                        fechaRegistro    = fechaRegistro.Length > 0 ? fechaRegistro + "|" + item.FechaRegistro : item.FechaRegistro;
                        reg_act_libro    = reg_act_libro.Length > 0 ? reg_act_libro + "|" + item.RegistroActual.Libro : item.RegistroActual.Libro;
                        reg_act_tomo     = reg_act_tomo.Length > 0 ? reg_act_tomo + "|" + item.RegistroActual.Tomo : item.RegistroActual.Tomo;
                        reg_act_semestre = reg_act_semestre.Length > 0 ? reg_act_semestre + "|" + item.RegistroActual.Semestre : item.RegistroActual.Semestre;
                        reg_act_anio     = reg_act_anio.Length > 0 ? reg_act_anio + "|" + item.RegistroActual.Año : item.RegistroActual.Año;
                        reg_act_seccion  = reg_act_seccion.Length > 0 ? reg_act_seccion + "|" + item.RegistroActual.Seccion : item.RegistroActual.Seccion;
                        reg_act_serie    = reg_act_serie.Length > 0 ? reg_act_serie + "|" + item.RegistroActual.Serie : item.RegistroActual.Serie;
                        reg_act_partida  = reg_act_partida.Length > 0 ? reg_act_partida + "|" + item.RegistroActual.Partida : item.RegistroActual.Partida;

                        /*inegiEstado = inegiEstado.Length > 0 ? inegiEstado + "|" + item : item.Superficie;
                         * inegiMunicipio = superficie.Length > 0 ? superficie + "|" + item.Superficie : item.Superficie;
                         * inegiPoblacion = superficie.Length > 0 ? superficie + "|" + item.Superficie : item.Superficie;
                         * inegiColonia = superficie.Length > 0 ? superficie + "|" + item.Superficie : item.Superficie;
                         * inegiCalle = superficie.Length > 0 ? superficie + "|" + item.Superficie : item.Superficie;
                         * inegiNumeroCalle = superficie.Length > 0 ? superficie + "|" + item.Superficie : item.Superficie;*/
                    }
                }

                SqlConnection con = new SqlConnection(Connection.getConnection());
                con.Open();
                SqlCommand comm = new SqlCommand("INSERT INTO CompendioDigitalizacion VALUES (" +
                                                 "'Escritura Pública', '" + prelacion.NumeroEscritura + "', '" + prelacion.FechaDocumento + "', '" + prelacion.LugarOtorgamiento + "', '" + prelacion.Tramitante + "', '" + actosString + "', '" + an_reg_libro + "', '" + an_reg_tomo + "', '" + an_reg_semestre + "', '" + an_reg_anio + "', '" + an_reg_seccion + "', '" + an_reg_serie + "', '" + an_reg_partida + "', '" + otorgantes + "', '" + adquirientes + "', '" + prelacion.ValorInmueble + "', '" + prelacion.TipoMoneda + "', '" + tipoPredio + "', '" + superficie + "', '" + unidadSuperficie + "', '" + prelacion.DescripcionBien + "', '" + municipio + "', '" + poblacion + "', '" + claveCatastral + "', '" + norte + "', '" + sur + "', '" + este + "', '" + oeste + "', '" + noreste + "', '" + sureste + "', '" + suroeste + "', '" + noroeste + "', '" + fechaRegistro + "', '" + reg_act_libro + "', '" + reg_act_tomo + "', '" + reg_act_semestre + "', '" + reg_act_anio + "', '" + reg_act_seccion + "', '" + reg_act_serie + "', '" + reg_act_partida + "', '" + an_marg_observaciones + "', '', '" + an_marg_libro + "', '" + an_marg_semestre + "', '" + an_marg_semestre + "', '" + an_marg_anio + "', '" + an_marg_seccion + "', '" + an_marg_serie + "', '" + an_marg_partida + "', '" + an_marg_observaciones + "', 'inegiestado', 'inegimunicipio', 'inegipoblacion', 'inegicolonia', 'inegicalle', 'ineginumerocalle', '" + prelacion.Folio + "', '" + prelacion.IdPrelacion + "')", con);
                int result = comm.ExecuteNonQuery();
                if (result > 0)
                {
                    con.Close();
                }
                else
                {
                    con.Close();
                }

                return("OK");
            }
            catch (Exception exc)
            {
                return(exc.Message);
            }
        }