Пример #1
0
 public static int Insert(RutasInfo _RutasInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"RutasInsert",
         new SqlParameter("@Bit_Location", _RutasInfo.Bit_Location),
         new SqlParameter("@Descripcion", _RutasInfo.Descripcion),
         new SqlParameter("@Download", _RutasInfo.Download),
         new SqlParameter("@Action", _RutasInfo.Action),
         new SqlParameter("@orden", _RutasInfo.orden),
         new SqlParameter("@SyncID", _RutasInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
Пример #2
0
 public static void Update(RutasInfo _RutasInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "RutasUpdate",
         new SqlParameter("@Id", _RutasInfo.Id),
         new SqlParameter("@Bit_Location", _RutasInfo.Bit_Location),
         new SqlParameter("@Descripcion", _RutasInfo.Descripcion),
         new SqlParameter("@Download", _RutasInfo.Download),
         new SqlParameter("@Action", _RutasInfo.Action),
         new SqlParameter("@orden", _RutasInfo.orden),
         new SqlParameter("@SyncID", _RutasInfo.SyncID)
     );
 }
Пример #3
0
 public static void Delete(RutasInfo _RutasInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "RutasDelete",
         new SqlParameter("@Id", _RutasInfo.Id)
     );
 }
Пример #4
0
        /// <summary>
        /// Creates a new instance of the Rutas class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static RutasInfo MakeRutas(SqlDataReader dataReader)
        {
            RutasInfo rutas = new RutasInfo();

            if (dataReader.IsDBNull(Id) == false)
                rutas.Id = dataReader.GetInt32(Id);
            if (dataReader.IsDBNull(Bit_Location) == false)
                rutas.Bit_Location = dataReader.GetInt32(Bit_Location);
            if (dataReader.IsDBNull(Descripcion) == false)
                rutas.Descripcion = dataReader.GetString(Descripcion);
            if (dataReader.IsDBNull(Download) == false)
                rutas.Download = dataReader.GetDateTime(Download);
            if (dataReader.IsDBNull(Action) == false)
                rutas.Action = dataReader.GetString(Action);
            if (dataReader.IsDBNull(Orden) == false)
                rutas.orden = dataReader.GetInt32(Orden);
            if (dataReader.IsDBNull(SyncID) == false)
                rutas.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                rutas.SyncTimeStamp = DateTime.MinValue;

            return rutas;
        }