public static int Insert(Calles_SegmentosInfo _Calles_SegmentosInfo) { //Execute the query and return the new Guid object retval= _AdoHelper.ExecuteScalar(ConnectionString,"Calles_SegmentosInsert", new SqlParameter("@cod_calle", _Calles_SegmentosInfo.cod_calle), new SqlParameter("@desde", _Calles_SegmentosInfo.desde), new SqlParameter("@hasta", _Calles_SegmentosInfo.hasta), new SqlParameter("@paridad", _Calles_SegmentosInfo.paridad), new SqlParameter("@CP", _Calles_SegmentosInfo.CP), new SqlParameter("@SyncID", _Calles_SegmentosInfo.SyncID) ); return Int32.Parse(retval.ToString()); }
public static void Update(Calles_SegmentosInfo _Calles_SegmentosInfo) { _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "Calles_SegmentosUpdate", new SqlParameter("@cod_segmento", _Calles_SegmentosInfo.cod_segmento), new SqlParameter("@cod_calle", _Calles_SegmentosInfo.cod_calle), new SqlParameter("@desde", _Calles_SegmentosInfo.desde), new SqlParameter("@hasta", _Calles_SegmentosInfo.hasta), new SqlParameter("@paridad", _Calles_SegmentosInfo.paridad), new SqlParameter("@CP", _Calles_SegmentosInfo.CP), new SqlParameter("@SyncID", _Calles_SegmentosInfo.SyncID) ); }
public static void Delete(Calles_SegmentosInfo _Calles_SegmentosInfo) { _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "Calles_SegmentosDelete", new SqlParameter("@cod_segmento", _Calles_SegmentosInfo.cod_segmento) ); }
/// <summary> /// Creates a new instance of the Calles_Segmentos class and populates it with data from the specified SqlDataReader. /// </summary> private static Calles_SegmentosInfo MakeCalles_Segmentos(SqlDataReader dataReader) { Calles_SegmentosInfo calles_Segmentos = new Calles_SegmentosInfo(); if (dataReader.IsDBNull(Cod_segmento) == false) calles_Segmentos.cod_segmento = dataReader.GetInt32(Cod_segmento); if (dataReader.IsDBNull(Cod_calle) == false) calles_Segmentos.cod_calle = dataReader.GetInt32(Cod_calle); if (dataReader.IsDBNull(Desde) == false) calles_Segmentos.desde = dataReader.GetInt32(Desde); if (dataReader.IsDBNull(Hasta) == false) calles_Segmentos.hasta = dataReader.GetInt32(Hasta); if (dataReader.IsDBNull(Paridad) == false) calles_Segmentos.paridad = dataReader.GetBoolean(Paridad); if (dataReader.IsDBNull(CP) == false) calles_Segmentos.CP = dataReader.GetString(CP); if (dataReader.IsDBNull(SyncID) == false) calles_Segmentos.SyncID = dataReader.GetGuid(SyncID); if (dataReader.IsDBNull(SyncTimeStamp) == false) calles_Segmentos.SyncTimeStamp = DateTime.MinValue; return calles_Segmentos; }