Ejemplo n.º 1
0
        public Result UpdateEvent(PostUserCalenderUpdateTypeModel model, int?userId = null)
        {
            var entity = _calenderDal.Get(s => s.Id == model.Id);

            if (entity == null)
            {
                return new Result
                       {
                           Message = "Veri Bulunamadı",
                           Success = false
                       }
            }
            ;

            userId = userId ?? AuthenticateHelper.AuthenticateUserId();
            if (entity.UserId != userId)
            {
                return new Result
                       {
                           Message = "Bu Veriyi Düzenleme Yetkiniz Yok",
                           Success = false
                       }
            }
            ;

            entity.RecordType = model.RecordType;
            _calenderDal.Update(entity);

            return(new Result
            {
                Message = "Veri Düzenlendi",
                Success = true
            });
        }
 public ActionResult UpdateEvent(PostUserCalenderUpdateTypeModel model, int userId)
 {
     return(Ok(_calenderService.UpdateEvent(model, userId)));
 }
Ejemplo n.º 3
0
 public JsonResult UpdateEvent(PostUserCalenderUpdateTypeModel model)
 {
     return(Json(_calenderService.UpdateEvent(model)));
 }