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