コード例 #1
0
 public Int32 EditPergunta(PACIENTE_ANAMNESE_PERGUNTA item)
 {
     try
     {
         // Persiste
         return(_baseService.EditPergunta(item));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
コード例 #2
0
 public Int32 CreatePergunta(PACIENTE_ANAMNESE_PERGUNTA item)
 {
     try
     {
         // Persiste
         item.PCAN_IN_ATIVO = 1;
         Int32 volta = _baseService.CreatePergunta(item);
         return(volta);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
コード例 #3
0
 public Int32 CreatePergunta(PACIENTE_ANAMNESE_PERGUNTA item)
 {
     using (DbContextTransaction transaction = Db.Database.BeginTransaction(IsolationLevel.ReadCommitted))
     {
         try
         {
             _pgRepository.Add(item);
             transaction.Commit();
             return(0);
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             throw ex;
         }
     }
 }
コード例 #4
0
 public Int32 EditPergunta(PACIENTE_ANAMNESE_PERGUNTA item)
 {
     using (DbContextTransaction transaction = Db.Database.BeginTransaction(IsolationLevel.ReadCommitted))
     {
         try
         {
             PACIENTE_ANAMNESE_PERGUNTA obj = _pgRepository.GetById(item.PCAN_CD_ID);
             _pgRepository.Detach(obj);
             _pgRepository.Update(item);
             transaction.Commit();
             return(0);
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             throw ex;
         }
     }
 }
コード例 #5
0
        public PACIENTE_ANAMNESE_PERGUNTA GetPerguntaById(Int32 id)
        {
            PACIENTE_ANAMNESE_PERGUNTA lista = _baseService.GetPerguntaById(id);

            return(lista);
        }