public async Task <ColumnSettingsResult> GetReszletekSettings([FromQuery] string sid) { var result = new ColumnSettingsResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = ProjektBll.ReszletekSettings(_context, sid); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <BaseResults.EmptyResult> Delete([FromQuery] string sid, [FromBody] ProjektDto dto) { var result = new BaseResults.EmptyResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { await ProjektBll.DeleteAsync(_context, sid, dto); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <ProjektResult> Get([FromQuery] string sid, [FromBody] int key) { var result = new ProjektResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = new List <ProjektDto> { await ProjektBll.GetAsync(_context, sid, key) }; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <ProjektResult> Select([FromQuery] string sid, [FromBody] ProjektParam par) { var result = new ProjektResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { var t = await ProjektBll.SelectAsync(_context, sid, par.RekordTol, par.LapMeret, par.Statusz, par.Fi); result.Result = t.Item1; result.OsszesRekord = t.Item2; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }