Exemplo n.º 1
0
        public static async Task <int> AddAsync(ossContext context, string sid, AjanlatkeresDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.AJANLATKERESMOD);

            var entity = ObjectUtils.Convert <AjanlatkeresDto, Models.Ajanlatkeres>(dto);

            return(await AjanlatkeresDal.AddAsync(context, entity));
        }
Exemplo n.º 2
0
        public static async Task <AjanlatkeresDto> GetAsync(ossContext context, string sid, int key)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.AJANLATKERES);

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

            return(ObjectUtils.Convert <Models.Ajanlatkeres, AjanlatkeresDto>(entity));
        }
Exemplo n.º 3
0
        public static async Task DeleteAsync(ossContext context, string sid, AjanlatkeresDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.AJANLATKERESMOD);

            await AjanlatkeresDal.Lock(context, dto.Ajanlatkereskod, dto.Modositva);

            var entity = await AjanlatkeresDal.GetAsync(context, dto.Ajanlatkereskod);

            await AjanlatkeresDal.DeleteAsync(context, entity);
        }
Exemplo n.º 4
0
        public static async Task <int> UpdateAsync(ossContext context, string sid, AjanlatkeresDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.AJANLATKERESMOD);

            await AjanlatkeresDal.Lock(context, dto.Ajanlatkereskod, dto.Modositva);

            var entity = await AjanlatkeresDal.GetAsync(context, dto.Ajanlatkereskod);

            ObjectUtils.Update(dto, entity);
            return(await AjanlatkeresDal.UpdateAsync(context, entity));
        }
Exemplo n.º 5
0
        public static async Task <Tuple <List <AjanlatkeresDto>, int> > SelectAsync(ossContext context, string sid, int rekordTol,
                                                                                    int lapMeret, List <SzMT> szmt)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.AJANLATKERES);

            var qry          = AjanlatkeresDal.GetQuery(context, szmt);
            var osszesRekord = qry.Count();
            var entities     = qry.Skip(rekordTol).Take(lapMeret).ToList();

            return(new Tuple <List <AjanlatkeresDto>, int>(ObjectUtils.Convert <Models.Ajanlatkeres, AjanlatkeresDto>(entities), osszesRekord));
        }