public override RawMaterialOrder GetRawMaterialOrderByRawMaterialOrderIDDAL(Guid RawMaterialorderID) { RawMaterialOrder matchingRawMaterialOrder = null; try { //Find RawMaterialOrder based on searchRawMaterialOrderID matchingRawMaterialOrder = RawMaterialorderList.Find( (item) => { return(item.RawMaterialOrderID == RawMaterialorderID); } ); } catch (Exception) { throw; } return(matchingRawMaterialOrder); }
/// <returns>Determinates whether the new systemUser is added.</returns> public override bool AddRawMaterialOrderDAL(RawMaterialOrder newRawMaterialOrder) { bool RawMaterialorderAdded = false; try { newRawMaterialOrder.RawMaterialOrderID = Guid.NewGuid(); newRawMaterialOrder.RawMaterialOrderDate = DateTime.Now; newRawMaterialOrder.LastmodifiedDateTime = DateTime.Now; RawMaterialorderList.Add(newRawMaterialOrder); RawMaterialorderAdded = true; } catch (Exception) { throw; } return(RawMaterialorderAdded); }
public override bool DeleteRawMaterialOrderDAL(Guid deleteRawMaterialOrderID) { bool RawMaterialOrderDeleted = false; try { //Find RawMaterialOrder based on searchRawMaterialOrderID RawMaterialOrder matchingRawMaterialOrder = RawMaterialorderList.Find( (item) => { return(item.RawMaterialOrderID == deleteRawMaterialOrderID); } ); if (matchingRawMaterialOrder != null) { //Delete RawMaterialOrder from the collection RawMaterialorderList.Remove(matchingRawMaterialOrder); RawMaterialOrderDeleted = true; } } catch (Exception) { throw; } return(RawMaterialOrderDeleted); }