Example #1
0
        public static async Task <int> UpdateAsync(ossContext context, string sid, UgyfelDto dto)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.UGYFELEKMOD);

            await UgyfelDal.Lock(context, dto.Ugyfelkod, dto.Modositva);

            var entity = await UgyfelDal.GetAsync(context, dto.Ugyfelkod);

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

            return(await UgyfelDal.UpdateAsync(context, entity));
        }
Example #2
0
        public static async Task <UgyfelDto> UpdatePosAsync(ossContext context, string sid,
                                                            int Ugyfelkod, int X, int Y, DateTime UtolsoModositas)
        {
            SessionBll.Check(context, sid);
            await CsoportDal.JogeAsync(context, JogKod.UGYFELEKMOD);

            await UgyfelDal.Lock(context, Ugyfelkod, UtolsoModositas);

            var entity = await UgyfelDal.GetAsync(context, Ugyfelkod);

            entity.Halox = X;
            entity.Haloy = Y;
            await UgyfelDal.UpdateAsync(context, entity);

            return(await GetAsync(context, Ugyfelkod));
        }