public static int Insert(Lugares_De_VisitaInfo _Lugares_De_VisitaInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"Lugares_De_VisitaInsert",
         new SqlParameter("@Cod_TipoLDV", _Lugares_De_VisitaInfo.Cod_TipoLDV),
         new SqlParameter("@Cod_Importancia", _Lugares_De_VisitaInfo.Cod_Importancia),
         new SqlParameter("@Nombre_Lugar", _Lugares_De_VisitaInfo.Nombre_Lugar),
         new SqlParameter("@Cod_Direccion", _Lugares_De_VisitaInfo.Cod_Direccion),
         new SqlParameter("@Contacto", _Lugares_De_VisitaInfo.Contacto),
         new SqlParameter("@Cod_Temporario", _Lugares_De_VisitaInfo.Cod_Temporario),
         new SqlParameter("@Fecha_Alta", _Lugares_De_VisitaInfo.Fecha_Alta),
         new SqlParameter("@Cod_Operador_Alta", _Lugares_De_VisitaInfo.Cod_Operador_Alta),
         new SqlParameter("@External_Code", _Lugares_De_VisitaInfo.External_Code),
         new SqlParameter("@Download", _Lugares_De_VisitaInfo.Download),
         new SqlParameter("@Action", _Lugares_De_VisitaInfo.Action),
         new SqlParameter("@SyncID", _Lugares_De_VisitaInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
        /// <summary>
        /// Creates a new instance of the Lugares_De_Visita class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static Lugares_De_VisitaInfo MakeLugares_De_Visita(SqlDataReader dataReader)
        {
            Lugares_De_VisitaInfo lugares_De_Visita = new Lugares_De_VisitaInfo();

            if (dataReader.IsDBNull(Cod_LDV) == false)
                lugares_De_Visita.Cod_LDV = dataReader.GetInt32(Cod_LDV);
            if (dataReader.IsDBNull(Cod_TipoLDV) == false)
                lugares_De_Visita.Cod_TipoLDV = dataReader.GetInt32(Cod_TipoLDV);
            if (dataReader.IsDBNull(Cod_Importancia) == false)
                lugares_De_Visita.Cod_Importancia = dataReader.GetInt32(Cod_Importancia);
            if (dataReader.IsDBNull(Nombre_Lugar) == false)
                lugares_De_Visita.Nombre_Lugar = dataReader.GetString(Nombre_Lugar);
            if (dataReader.IsDBNull(Cod_Direccion) == false)
                lugares_De_Visita.Cod_Direccion = dataReader.GetInt32(Cod_Direccion);
            if (dataReader.IsDBNull(Contacto) == false)
                lugares_De_Visita.Contacto = dataReader.GetString(Contacto);
            if (dataReader.IsDBNull(Cod_Temporario) == false)
                lugares_De_Visita.Cod_Temporario = dataReader.GetInt32(Cod_Temporario);
            if (dataReader.IsDBNull(Fecha_Alta) == false)
                lugares_De_Visita.Fecha_Alta = dataReader.GetDateTime(Fecha_Alta);
            if (dataReader.IsDBNull(Cod_Operador_Alta) == false)
                lugares_De_Visita.Cod_Operador_Alta = dataReader.GetString(Cod_Operador_Alta);
            if (dataReader.IsDBNull(External_Code) == false)
                lugares_De_Visita.External_Code = dataReader.GetString(External_Code);
            if (dataReader.IsDBNull(Download) == false)
                lugares_De_Visita.Download = dataReader.GetDateTime(Download);
            if (dataReader.IsDBNull(Action) == false)
                lugares_De_Visita.Action = dataReader.GetString(Action);
            if (dataReader.IsDBNull(SyncID) == false)
                lugares_De_Visita.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                lugares_De_Visita.SyncTimeStamp = DateTime.MinValue;

            return lugares_De_Visita;
        }
 public static void Delete(Lugares_De_VisitaInfo _Lugares_De_VisitaInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "Lugares_De_VisitaDelete",
         new SqlParameter("@Cod_LDV", _Lugares_De_VisitaInfo.Cod_LDV)
     );
 }
 public static void Update(Lugares_De_VisitaInfo _Lugares_De_VisitaInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "Lugares_De_VisitaUpdate",
         new SqlParameter("@Cod_LDV", _Lugares_De_VisitaInfo.Cod_LDV),
         new SqlParameter("@Cod_TipoLDV", _Lugares_De_VisitaInfo.Cod_TipoLDV),
         new SqlParameter("@Cod_Importancia", _Lugares_De_VisitaInfo.Cod_Importancia),
         new SqlParameter("@Nombre_Lugar", _Lugares_De_VisitaInfo.Nombre_Lugar),
         new SqlParameter("@Cod_Direccion", _Lugares_De_VisitaInfo.Cod_Direccion),
         new SqlParameter("@Contacto", _Lugares_De_VisitaInfo.Contacto),
         new SqlParameter("@Cod_Temporario", _Lugares_De_VisitaInfo.Cod_Temporario),
         new SqlParameter("@Fecha_Alta", _Lugares_De_VisitaInfo.Fecha_Alta),
         new SqlParameter("@Cod_Operador_Alta", _Lugares_De_VisitaInfo.Cod_Operador_Alta),
         new SqlParameter("@External_Code", _Lugares_De_VisitaInfo.External_Code),
         new SqlParameter("@Download", _Lugares_De_VisitaInfo.Download),
         new SqlParameter("@Action", _Lugares_De_VisitaInfo.Action),
         new SqlParameter("@SyncID", _Lugares_De_VisitaInfo.SyncID)
     );
 }