예제 #1
0
        public async Task <IHttpActionResult> ModificaMetaDatiEmendamento(EmendamentiDto model)
        {
            try
            {
                var em = await _logicEm.GetEM(model.UIDEM);

                if (em == null)
                {
                    return(NotFound());
                }

                var session = await GetSession();

                var persona = await _logicPersone.GetPersona(session._currentUId);

                persona.CurrentRole = session._currentRole;

                await _logicEm.ModificaMetaDatiEmendamento(model, em, persona);

                return(Ok());
            }
            catch (Exception e)
            {
                Log.Error("ModificaMetaDatiEmendamento", e);
                return(ErrorHandler(e));
            }
        }