internal async Task <ActionResult> UpdateCommission(CommissionsViewModel model)
        {
            _context.Entry(model).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(Ok());
        }
        internal async Task <ActionResult> DeleteCommission(CommissionsViewModel commission)
        {
            _context.Commissions.Remove(commission);
            await _context.SaveChangesAsync();

            return(Ok());
        }
        internal async Task <ActionResult> CreateCommission(CommissionsViewModel model)
        {
            _context.Commissions.Add(model);
            await _context.SaveChangesAsync();

            return(Ok());
        }
Beispiel #4
0
        public async Task <ActionResult> UpdateCommission(CommissionsViewModel model, int id)
        {
            if (model.CommissionId != id)
            {
                return(BadRequest());
            }
            await _comService.UpdateCommissionAsync(model);

            return(Ok());
        }
Beispiel #5
0
        public async Task <ActionResult> CreateCommission(CommissionsViewModel model)
        {
            await _comService.CreateCommission(model);

            return(Ok());
        }
Beispiel #6
0
 public async Task <ActionResult> UpdateCommissionAsync(CommissionsViewModel model)
 {
     return(await _comRepository.UpdateCommission(model));
 }
Beispiel #7
0
 public async Task <ActionResult> DeleteCommission(CommissionsViewModel commission)
 {
     return(await _comRepository.DeleteCommission(commission));
 }
Beispiel #8
0
 public async Task <ActionResult> CreateCommission(CommissionsViewModel model)
 {
     model.Price = Math.Round(model.Price, 2);
     return(await _comRepository.CreateCommission(model));
 }