public async Task <ColumnSettingsResult> GetReszletekSettings([FromQuery] string sid) { var result = new ColumnSettingsResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = KifizetesBll.ReszletekSettings(_context, sid); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <Int32Result> Add([FromQuery] string sid, [FromBody] KifizetesDto dto) { var result = new Int32Result(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = await KifizetesBll.AddAsync(_context, sid, dto); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <KifizetesResult> Select([FromQuery] string sid, [FromBody] int bizonylatKod) { var result = new KifizetesResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = await KifizetesBll.SelectAsync(_context, sid, bizonylatKod); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <KifizetesResult> Get([FromQuery] string sid, [FromBody] int key) { var result = new KifizetesResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = new List <KifizetesDto> { await KifizetesBll.GetAsync(_context, sid, key) }; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }