コード例 #1
0
        public async Task <ColumnSettingsResult> GetReszletekSettings([FromQuery] string sid)
        {
            var result = new ColumnSettingsResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = CsoportBll.ReszletekSettings(_context, sid);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }
コード例 #2
0
        public async Task <JogaimResult> Jogaim([FromQuery] string sid)
        {
            var result = new JogaimResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await CsoportBll.JogaimAsync(_context, sid);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }
コード例 #3
0
        public async Task <Int32Result> Add([FromQuery] string sid, [FromBody] CsoportDto dto)
        {
            var result = new Int32Result();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await CsoportBll.AddAsync(_context, sid, dto);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }
コード例 #4
0
        public async Task <FelhasznaloResult> SelectCsoportFelhasznalo([FromQuery] string sid,
                                                                       [FromBody] int csoportKod)
        {
            var result = new FelhasznaloResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await CsoportBll.SelectCsoportFelhasznaloAsync(_context, sid, csoportKod);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }
コード例 #5
0
        public async Task <CsoportResult> Get([FromQuery] string sid, [FromBody] int key)
        {
            var result = new CsoportResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = new List <CsoportDto> {
                        await CsoportBll.GetAsync(_context, sid, key)
                    };

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }
コード例 #6
0
        public async Task <BaseResults.EmptyResult> CsoportJogBeKi([FromQuery] string sid,
                                                                   [FromBody] CsoportJogParameter par)
        {
            var result = new BaseResults.EmptyResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    await CsoportBll.CsoportJogBeKiAsync(_context, sid,
                                                         par.CsoportKod, par.LehetsegesJogKod, par.Be);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }