public async Task <BaseResults.EmptyResult> Delete([FromQuery] string sid, [FromBody] HelysegDto dto) { var result = new BaseResults.EmptyResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { await HelysegBll.DeleteAsync(_context, sid, dto); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <BaseResults.EmptyResult> ZoomCheck([FromQuery] string sid, [FromBody] HelysegZoomParameter par) { var result = new BaseResults.EmptyResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { await HelysegBll.ZoomCheckAsync(_context, sid, par.Helysegkod, par.Helysegnev); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <ColumnSettingsResult> GetReszletekSettings([FromQuery] string sid) { var result = new ColumnSettingsResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = HelysegBll.ReszletekSettings(_context, sid); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <HelysegResult> Read([FromQuery] string sid, [FromBody] string maszk) { var result = new HelysegResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = await HelysegBll.ReadAsync(_context, sid, maszk); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <HelysegResult> Get([FromQuery] string sid, [FromBody] int key) { var result = new HelysegResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = new List <HelysegDto> { await HelysegBll.GetAsync(_context, sid, key) }; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }