示例#1
0
        public static async Task <CsoportDto> GetAsync(ossContext context, string sid, int key)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.CSOPORT);

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

            return(ObjectUtils.Convert <Models.Csoport, CsoportDto>(entity));
        }
示例#2
0
        public static async Task DeleteAsync(ossContext context, string sid, CsoportDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.CSOPORT);

            await CsoportDal.Lock(context, dto.Csoportkod, dto.Modositva);

            await CsoportDal.CheckReferencesAsync(context, dto.Csoportkod);

            var entity = await CsoportDal.GetAsync(context, dto.Csoportkod);

            await CsoportDal.DeleteAsync(context, entity);
        }
示例#3
0
        public static async Task <int> UpdateAsync(ossContext context, string sid, CsoportDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.CSOPORT);

            await CsoportDal.Lock(context, dto.Csoportkod, dto.Modositva);

            var entity = await CsoportDal.GetAsync(context, dto.Csoportkod);

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

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