public bool AddSelectorForeignKey(ref DTO.DocumentClientMng.ForeignKeyTable dtoItem, out Library.DTO.Notification notification) { int ID = 0; bool result = false; notification = new Library.DTO.Notification(); if (dtoItem.Foreign_Type == 1) { result = factory.Add_TypeOfDelivery(dtoItem.Foreign_NM, out ID, out notification); } else if (dtoItem.Foreign_Type == 2) { result = factory.Add_PlaceOfBarge(dtoItem.Foreign_NM, out ID, out notification); } else if (dtoItem.Foreign_Type == 3) { result = factory.Add_PlaceOfDelivery(dtoItem.Foreign_NM, out ID, out notification); } else if (dtoItem.Foreign_Type == 4) { result = factory.Add_DeliveryStatus(dtoItem.Foreign_NM, out ID, out notification); } else if (dtoItem.Foreign_Type == 5) { result = factory.Add_PaymentStatus(dtoItem.Foreign_NM, out ID, out notification); } dtoItem.Foreign_ID = ID; return(result); }
public IHttpActionResult AddSelectorForeignKey(DTO.DocumentClientMng.ForeignKeyTable dtoItem) { BLL.DocumentClientMng bll = new BLL.DocumentClientMng(); Library.DTO.Notification notification; bll.AddSelectorForeignKey(ref dtoItem, out notification); return(Ok(new Library.DTO.ReturnData <DTO.DocumentClientMng.ForeignKeyTable>() { Data = dtoItem, Message = notification })); }