public async Task <BaseResults.EmptyResult> Delete([FromQuery] string sid, [FromBody] ProjektJegyzetDto dto) { var result = new BaseResults.EmptyResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { await ProjektJegyzetBll.DeleteAsync(_context, sid, dto); 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 = ProjektJegyzetBll.ReszletekSettings(_context, sid); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <ProjektJegyzetResult> Select([FromQuery] string sid, [FromBody] int projektKod) { var result = new ProjektJegyzetResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = await ProjektJegyzetBll.SelectAsync(_context, sid, projektKod); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <ProjektJegyzetResult> CreateNew([FromQuery] string sid) { var result = new ProjektJegyzetResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = new List <ProjektJegyzetDto> { await ProjektJegyzetBll.CreateNewAsync(_context, sid) }; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }