Esempio n. 1
0
        public static async Task ZoomCheckAsync(ossContext context, string sid, int afakulcskod, string afakulcs)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.PRIMITIVEK);

            await AfakulcsDal.ZoomCheckAsync(context, afakulcskod, afakulcs);
        }
Esempio n. 2
0
        public static async Task <List <AfakulcsDto> > ReadAsync(ossContext context, string sid, string maszk)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.PRIMITIVEK);

            var entities = await AfakulcsDal.ReadAsync(context, maszk);

            return(ObjectUtils.Convert <Models.Afakulcs, AfakulcsDto>(entities));
        }
Esempio n. 3
0
        public static async Task <AfakulcsDto> GetAsync(ossContext context, string sid, int key)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.PRIMITIVEK);

            var entity = await AfakulcsDal.GetAsync(context, key);

            return(ObjectUtils.Convert <Models.Afakulcs, AfakulcsDto>(entity));
        }
Esempio n. 4
0
        public static async Task <int> AddAsync(ossContext context, string sid, AfakulcsDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.PRIMITIVEKMOD);

            var entity = ObjectUtils.Convert <AfakulcsDto, Models.Afakulcs>(dto);
            await AfakulcsDal.ExistsAsync(context, entity);

            return(await AfakulcsDal.AddAsync(context, entity));
        }
Esempio n. 5
0
        public static async Task DeleteAsync(ossContext context, string sid, AfakulcsDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.PRIMITIVEKMOD);

            await AfakulcsDal.Lock(context, dto.Afakulcskod, dto.Modositva);

            await AfakulcsDal.CheckReferencesAsync(context, dto.Afakulcskod);

            var entity = await AfakulcsDal.GetAsync(context, dto.Afakulcskod);

            await AfakulcsDal.DeleteAsync(context, entity);
        }
Esempio n. 6
0
        public static async Task <int> UpdateAsync(ossContext context, string sid, AfakulcsDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.PRIMITIVEKMOD);

            await AfakulcsDal.Lock(context, dto.Afakulcskod, dto.Modositva);

            var entity = await AfakulcsDal.GetAsync(context, dto.Afakulcskod);

            ObjectUtils.Update(dto, entity);
            await AfakulcsDal.ExistsAnotherAsync(context, entity);

            return(await AfakulcsDal.UpdateAsync(context, entity));
        }