예제 #1
0
        public async Task <BaseResults.EmptyResult> ZoomCheck([FromQuery] string sid, [FromBody] BizonylatZoomParameter par)
        {
            var result = new BaseResults.EmptyResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    await BizonylatBll.ZoomCheckAsync(_context, sid, par.Bizonylatkod, par.Bizonylatszam);

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

            return(result);
        }
예제 #2
0
        public async Task <BaseResults.EmptyResult> Delete([FromQuery] string sid, [FromBody] BizonylatDto dto)
        {
            var result = new BaseResults.EmptyResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    await BizonylatBll.DeleteAsync(_context, sid, dto);

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

            return(result);
        }
예제 #3
0
        public async Task <Int32Result> FuvardijTorles([FromQuery] string sid, [FromBody] BizonylatDto par)
        {
            var result = new Int32Result();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await BizonylatBll.FuvardijTorles(_context, sid, par);

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

            return(result);
        }
예제 #4
0
        public async Task <BizonylatTipusLeiroResult> BizonylatLeiro([FromQuery] string sid,
                                                                     [FromBody] BizonylatTipus bizonylatTipus)
        {
            var result = new BizonylatTipusLeiroResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await BizonylatBll.BizonylatLeiroAsync(_context, sid, bizonylatTipus);

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

            return(result);
        }
예제 #5
0
        public async Task <BizonylatResult> Get([FromQuery] string sid, [FromBody] int bizonylatKod)
        {
            var result = new BizonylatResult();

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

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

            return(result);
        }
예제 #6
0
        public async Task <Int32Result> UjBizonylatMintaAlapjan([FromQuery] string sid,
                                                                [FromBody] BizonylatMintaAlapjanParam par)
        {
            var result = new Int32Result();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await BizonylatBll.UjBizonylatMintaAlapjanAsync(_context, sid,
                                                                                    par.BizonylatKod, par.BizonylatTipus);

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

            return(result);
        }
예제 #7
0
        public async Task <BizonylatComplexResult> CreateNewComplex([FromQuery] string sid)
        {
            var result = new BizonylatComplexResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = new List <BizonylatComplexDto>
                    {
                        await BizonylatBll.CreateNewComplexAsync(_context, sid)
                    };

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

            return(result);
        }
예제 #8
0
        public async Task <BizonylatComplexResult> SumEsAfaEsTermekdij([FromQuery] string sid,
                                                                       [FromBody] BizonylatComplexDto dto)
        {
            var result = new BizonylatComplexResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = new List <BizonylatComplexDto> {
                        await BizonylatBll.SumEsAfaEsTermekdijAsync(_context, sid, dto)
                    };

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

            return(result);
        }
예제 #9
0
        public async Task <BizonylatTetelResult> Bruttobol([FromQuery] string sid,
                                                           [FromBody] BruttobolParam par)
        {
            var result = new BizonylatTetelResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = new List <BizonylatTetelDto>
                    {
                        await BizonylatBll.BruttobolAsync(_context, sid, par.dto, par.brutto)
                    };

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

            return(result);
        }
예제 #10
0
        public async Task <BizonylatResult> Select([FromQuery] string sid, [FromBody] BizonylatParam par)
        {
            var result = new BizonylatResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    var t = await BizonylatBll.SelectAsync(_context, sid, par.RekordTol, par.LapMeret,
                                                           par.BizonylatTipus, par.Fi);

                    result.Result       = t.Item1;
                    result.OsszesRekord = t.Item2;

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

            return(result);
        }