/// <summary author="Eric Bostwick" created="2019/02/06"> /// Updates an itemsuppler item by calling UpdateItemSupplier in the /// ItemSupplierAccessor /// </summary> /// <param name="item"></param> /// <param name="oldItem"></param> /// <returns> /// 1 if update successful 0 if not /// </returns> public int UpdateItemSupplier(ItemSupplier newItemSupplier, ItemSupplier oldItemSupplier) { int result; try { if (!newItemSupplier.IsValid()) { throw new ArgumentException("Data for this itemsupplier is invalid"); } result = _itemSupplierAccessor.UpdateItemSupplier(newItemSupplier, oldItemSupplier); } catch (Exception ex) { throw ex; } return(result); }
/// <summary author="Eric Bostwick" created="2019/02/05"> /// Insert an Record to the itemsupplier table /// </summary> /// <returns> /// returns 1 if successful 0 if not /// </returns> public int CreateItemSupplier(ItemSupplier itemSupplier) { int result; try { if (!itemSupplier.IsValid()) { throw new ArgumentException("Data for this itemsupplier record is invalid"); } result = _itemSupplierAccessor.InsertItemSupplier(itemSupplier); } catch (Exception ex) { throw ex; } return(result); }