コード例 #1
0
 public string Update(CorretorEntity corretor)
 {
     try
     {
         _repository.Update(corretor);
         return("Dados atualizados com suscesso !!!");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
コード例 #2
0
 public string Add(CorretorEntity corretor)
 {
     try
     {
         corretor.Cadastro = DateTime.Now.Date;
         _repository.Add(corretor);
         return("Corretor adicionado com suscesso !!!");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
コード例 #3
0
        public JsonResult Remove(CorretorEntity corretor)
        {
            string _token = "";
            var    header = Request.Headers;

            _token = header["token-corretor"];
            if (!_token.Equals(_tokenapi))
            {
                return(Json("Token invalido"));
            }

            CorretorBusiness busines = new CorretorBusiness();

            return(Json(busines.Remove(corretor)));
        }
コード例 #4
0
 public bool Existe(CorretorEntity corretor)
 {
     return(_repository.Existe(corretor));
 }