public Guitar_Spec(string name, float price, float length, GuitarType type) { this.name = name; this.price = price; Length = length; this.type = type; }
public int CompareTo(IInstrument other) { if (other == null) { return(1); } Guitar otherFlute = (Guitar)other; return(InstrumentName.CompareTo(otherFlute.InstrumentName) + InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) + InstrumentValue.CompareTo(otherFlute.InstrumentValue) + IsAntiquity.CompareTo(otherFlute.IsAntiquity) + GuitarBrand.CompareTo(otherFlute.GuitarBrand) + GuitarType.CompareTo(otherFlute.GuitarType)); }
public void Edit(GuitarViewModel guitar, GuitarType type) { switch (type) { case GuitarType.Classical: _unitOfWork.ClassicAcousticGuitars.Update(ServiceMappings.Map <AcousticClassicalGuitarDataModel>(guitar)); break; case GuitarType.Western: _unitOfWork.WesternAcousticGuitars.Update(ServiceMappings.Map <AcousticWesternGuitarDataModel>(guitar)); break; case GuitarType.Electric: _unitOfWork.ElectricGuitars.Update(ServiceMappings.Map <ElectricGuitarDataModel>(guitar)); break; case GuitarType.Bass: _unitOfWork.BassGuitars.Update(ServiceMappings.Map <BassGuitarDataModel>(guitar)); break; } }
public void Remove(int id, GuitarType type) { switch (type) { case GuitarType.Classical: _unitOfWork.ClassicAcousticGuitars.Delete(id); break; case GuitarType.Western: _unitOfWork.WesternAcousticGuitars.Delete(id); break; case GuitarType.Electric: _unitOfWork.ElectricGuitars.Delete(id); break; case GuitarType.Bass: _unitOfWork.BassGuitars.Delete(id); break; } }
public bool Contains(string term) { return(Builder.Contains(term) || Model.Contains(term) || GuitarType.Contains(term)); }