Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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));
        }