Beispiel #1
0
        public async Task <IHttpActionResult> Index(Guid id)
        {
            try
            {
                try
                {
                    var em = await _logicEm.GetEM_ByQR(id);

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

                    var body = await _logicPublic.GetBody(em
                                                          , await _logicFirme.GetFirme(em, FirmeTipoEnum.TUTTE));

                    return(Ok(body));
                }
                catch (Exception e)
                {
                    Log.Error("GetBody", e);
                    return(ErrorHandler(e));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Beispiel #2
0
        public async Task <IHttpActionResult> GetFirmatari(Guid id, FirmeTipoEnum tipo)
        {
            try
            {
                var em = await _logicEm.GetEM(id);

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

                var result = await _logicFirme.GetFirme(em, tipo);

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