示例#1
0
 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));
         }
     }
 }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
 public ReceiptNoteEntity Update(Guid ReceiptNoteId, [FromBody]ReceiptNoteEntity ReceiptNoteEntity)
 {
     return ReceiptNoteService.Update(EmployeeEntity, ReceiptNoteId, ReceiptNoteEntity);
 }
示例#5
0
 public ReceiptNoteEntity Create([FromBody]ReceiptNoteEntity ReceiptNoteEntity)
 {
     return ReceiptNoteService.Create(EmployeeEntity, ReceiptNoteEntity);
 }