/// <summary> /// Equals function to compare class /// </summary> public virtual bool Exists(Int32 id) { try { DataAccess.BomItems bomItems = new DataAccess.BomItems(); return(bomItems.GetById(id) != null); } catch (Exception ex) { Trace.WriteError("{0}", Trace.GetMethodName(), CLASSNAME, ex, id); throw; } }
/// <summary> /// Get a BomItem by id from the database /// </summary> public virtual Model.BomItem GetById(Int32 id) { try { DataAccess.BomItems bomItems = new DataAccess.BomItems(); Model.BomItem result = bomItems.GetById(id); return(result); } catch (Exception ex) { Trace.WriteError("{0}", Trace.GetMethodName(), CLASSNAME, ex, id); throw; } }