public static void UpdateState(Guid id, NewsItemsStates state) { Database db = new DatabaseProviderFactory().CreateDefault(); DbCommand command = db.GetStoredProcCommand("p_NewsItems_UpdateState", id, state); command.CommandTimeout = DataBaseSettings.SqlCommandTimeout; db.ExecuteNonQuery(command); }
public NewsItem(IDataReader dr) { Id = dr["Id"].ToGuid(); ChannelId = dr["ChannelId"].ToInt32(); Title = dr["Title"].ToStr(); Description = dr["Description"].ToStr(); Url = dr["Url"].ToStr(); Date = dr["Date"].ToDateTime(); State = dr["State"].ToEnum <NewsItemsStates>(); }
public static void UpdateState(Guid id, NewsItemsStates state) { NewsItems.UpdateState(id, state); }