Ejemplo n.º 1
0
        public async Task <HttpResponseMessage> UpdateGroup([FromUri] int id, [FromBody] EditGroupModel model)
        {
            Log.Out.BeginInfo(model.ToJson(), "UpdateGroup - Id: {0}", id);
            model.ModifiedBy = UserHelper.GetId();
            await Service.Get <ISystemService>().UpdateGroup(id, model);

            Log.Out.EndInfo("UpdateGroup - Id: {0}", id);
            return(Request.CreateResponse(HttpStatusCode.OK));
        }
Ejemplo n.º 2
0
        public async Task <HttpResponseMessage> AddGroup([FromBody] EditGroupModel model)
        {
            Log.Out.BeginInfo(model.ToJson(), "AddGroup");
            int userId = UserHelper.GetId();

            model.CreatedBy  = userId;
            model.ModifiedBy = userId;
            var id = await Service.Get <ISystemService>().AddGroup(model);

            Log.Out.EndInfo("AddGroup - Id: {0}", id);
            return(Request.CreateResponse(HttpStatusCode.OK, new { Id = id }));
        }