public ReceiptNote(ReceiptNoteEntity ReceiptNoteEntity) : base(ReceiptNoteEntity) { if (ReceiptNoteEntity.ReceiptNoteLineEntities != null) { this.ReceiptNoteLines = new HashSet <ReceiptNoteLine>(); foreach (ReceiptNoteLineEntity ReceiptNoteLineEntity in ReceiptNoteEntity.ReceiptNoteLineEntities) { ReceiptNoteLineEntity.ReceiptNoteId = ReceiptNoteEntity.Id; this.ReceiptNoteLines.Add(new ReceiptNoteLine(ReceiptNoteLineEntity)); } } }
public ReceiptNoteEntity Create(EmployeeEntity EmployeeEntity, ReceiptNoteEntity ReceiptNoteEntity) { if (ReceiptNoteEntity == null) { throw new NotFoundException(); } ReceiptNote ReceiptNote = new ReceiptNote(ReceiptNoteEntity); UnitOfWork.ReceiptNoteRepository.AddOrUpdate(ReceiptNote); UnitOfWork.Complete(); return(Get(EmployeeEntity, ReceiptNote.Id)); }
public ReceiptNoteEntity Update(EmployeeEntity EmployeeEntity, Guid ReceiptNoteId, ReceiptNoteEntity ReceiptNoteEntity) { if (ReceiptNoteEntity == null) { throw new NotFoundException(); } ReceiptNoteEntity.Id = ReceiptNoteId; ReceiptNote ReceiptNote = new ReceiptNote(ReceiptNoteEntity); UnitOfWork.Complete(); return(Get(EmployeeEntity, ReceiptNote.Id)); }
public ReceiptNoteEntity Update(Guid ReceiptNoteId, [FromBody]ReceiptNoteEntity ReceiptNoteEntity) { return ReceiptNoteService.Update(EmployeeEntity, ReceiptNoteId, ReceiptNoteEntity); }
public ReceiptNoteEntity Create([FromBody]ReceiptNoteEntity ReceiptNoteEntity) { return ReceiptNoteService.Create(EmployeeEntity, ReceiptNoteEntity); }