public bool Contains(ct value) { return(List.Contains(value)); }
public void Remove(ct value) { List.Remove(value); }
public void Insert(int index, ct value) { List.Insert(index, value); }
public int IndexOf(ct value) { return(List.IndexOf(value)); }
public int Add(ct value) { return(List.Add(value)); }
/// Lấy tất cả đối tượng /// ///</summary> public ctCollection Getlist(string sTextSearch) { Data objData; if (objDataAccess == null) { objData = new Data(); } else { objData = objDataAccess; } ctCollection col = null; try { if (objData.GetConnection() == null || objData.GetConnection().State == ConnectionState.Closed) { objData.Connect(); } objData.CreateNewStoredProcedure("sproc_Contents_Get"); objData.AddParameter("@TextSearch", sTextSearch); IDataReader reader = objData.ExecStoreToDataReader(); while (reader.Read()) { if (col == null) { col = new ctCollection(); } ct obj = new ct(); if (!Convert.IsDBNull(reader["ID"])) { obj.ID = Convert.ToString(reader["ID"]); } if (!Convert.IsDBNull(reader["Title"])) { obj.Title = Convert.ToString(reader["Title"]); } if (!Convert.IsDBNull(reader["Detail"])) { obj.Detail = Convert.ToString(reader["Detail"]); } col.Add(obj); } reader.Close(); reader.Dispose(); } catch (Exception objEx) { throw new Exception("Getlist() Error " + objEx.Message.ToString()); } finally { if (objDataAccess == null) { objData.DeConnect(); } } return(col); }