Example #1
0
 public IHttpActionResult Get(long Id = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(nFeSDomain.Get <List <NFeSRequestQuery> >(Id)));
     }catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #2
0
 public IHttpActionResult GetPdf(long CompanyId, string NFNumber)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(nFeSDomain.GetArchives(CompanyId, NFNumber, NFeSDomain.TypeArchive.PDF)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #3
0
 public IHttpActionResult Get(long ServicesId = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(serviceDomain.Get <List <Services> >(ServicesId)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #4
0
 public IHttpActionResult Get(long CFPSId = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(cFPSDomain.Get <List <CFPS> >(CFPSId)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #5
0
 public IHttpActionResult Get(long TakerId = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(takerDomain.Get <List <Takers> >(TakerId)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #6
0
 public IHttpActionResult Put([FromBody] Takers Taker)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(takerDomain.Put(Taker)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #7
0
 public IHttpActionResult Put([FromBody] Companys Company)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(companyDomain.Put(Company)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #8
0
 public IHttpActionResult Get(long CompanyId = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(taxpayerActivitiesDomain.GetByCompany(CompanyId)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #9
0
 public IHttpActionResult GetByUser(long UserId = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(companyDomain.Get <List <Companys> >(CompanyDomain.Type.User, UserId)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #10
0
 public IHttpActionResult Get(long UserId = 0)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(usersDomain.Get(UserId)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #11
0
 public IHttpActionResult Put([FromBody] Services Service)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(serviceDomain.Put(Service)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #12
0
 public IHttpActionResult Issue([FromBody] NFeSRequest NFeSR)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(nFeSDomain.Issue(NFeSR)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #13
0
 public IHttpActionResult Put([FromBody] Users users)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         return(Ok(usersDomain.Put(users)));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #14
0
 public IHttpActionResult Post([FromBody] Responses obj)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         if (responsesDomain.Post(obj))
         {
             return(Ok());
         }
         return(BadRequest("Não foi possivel registrar a resposta!"));
     }catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #15
0
 public IHttpActionResult Post([FromBody] Certificates Certificates)
 {
     try
     {
         SessionDomain.CheckSession(base.Sessao());
         if (certificateDomain.UploadCertificate(Certificates))
         {
             return(Ok());
         }
         return(BadRequest("Não foi possivel cadastrar o certificado digital"));
     }
     catch (Exception ex)
     {
         return(Exceptions(ex));
     }
 }
Example #16
0
        public IHttpActionResult Delete(long TakerId)
        {
            try
            {
                SessionDomain.CheckSession(base.Sessao());
                if (takerDomain.Delete(TakerId))
                {
                    return(Ok("Tomador excluido com sucesso!"));
                }

                return(BadRequest("Houve um erro ao excluir o tomador. Tente novamente!"));
            }
            catch (Exception ex)
            {
                return(Exceptions(ex));
            }
        }
Example #17
0
        public IHttpActionResult Delete(long ServicesId)
        {
            try
            {
                SessionDomain.CheckSession(base.Sessao());
                if (serviceDomain.Delete(ServicesId))
                {
                    return(Ok("Serviço excluido com sucesso!"));
                }

                return(BadRequest("Houve um erro ao excluir o serviço. Tente novamente!"));
            }
            catch (Exception ex)
            {
                return(Exceptions(ex));
            }
        }
Example #18
0
        public IHttpActionResult Cancel(long CompanyId, string NFNumber)
        {
            try
            {
                throw new NotImplementedException();

                SessionDomain.CheckSession(base.Sessao());
                if (nFeSDomain.Cancel(CompanyId, NFNumber))
                {
                    return(Ok());
                }
                return(BadRequest("Não foi possivel cancelar a nota fiscal."));
            }
            catch (Exception ex)
            {
                return(Exceptions(ex));
            }
        }