Beispiel #1
0
        public GasCompensation Put([FromBody] GasCompensation item)
        {
            var g = gasCompensationRepository.Get(item.GasCompensationID);

            g.EmployeeID = item.EmployeeID;
            g.Currency   = item.Currency;
            g.Price      = item.Price;
            return(gasCompensationRepository.Update(g));
        }
Beispiel #2
0
        public async Task <ActionResult> AddGasCompensation([FromBody] GasCompensation item)
        {
            if (!AllowEdit(item.TripID))
            {
                return(Forbid());
            }

            await service.SaveGasCompensation(new GasCompensation()
            {
                TripID     = item.TripID,
                EmployeeID = item.EmployeeID,
                Price      = item.Price,
                Currency   = item.Currency,
            });

            return(Ok());
        }
Beispiel #3
0
 public Task <GasCompensation> SaveGasCompensation(GasCompensation item)
 {
     return(service.SaveGasCompensation(item));
 }
Beispiel #4
0
 public async Task <GasCompensation> SaveGasCompensation(GasCompensation item)
 {
     return(await gasCompensationRepository.Add(item));
 }