예제 #1
0
 public List <object> gerenciaDepartamentos(int acao, String ConnectionString)
 {
     try
     {
         lista_dados = new List <object>();
         dt          = new DataTable();
         dt          = _dao.GerenciaDepartamentos(this.Codigo, this.Email, this.Ramal, this.Nome, acao, ConnectionString);
         if (!(dt == null))
         {
             if (dt.Rows.Count > 0)
             {
                 for (int x = 0; x < dt.Rows.Count; x++)
                 {
                     DepartamentoTO item = new DepartamentoTO(false);
                     item.Codigo = int.Parse(dt.Rows[x]["CODIGO"].ToString());
                     item.Email  = dt.Rows[x]["EMAIL"].ToString();
                     item.Ramal  = int.Parse(dt.Rows[x]["RAMAL"].ToString());
                     item.Nome   = dt.Rows[x]["NOME"].ToString();
                 }
             }
         }
         return(lista_dados);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
        public List<object> gerenciaDepartamentos(int acao, String ConnectionString)
        {
            try
               {
               lista_dados = new List<object>();
               dt = new DataTable();
               dt = _dao.GerenciaDepartamentos(this.Codigo, this.Email, this.Ramal, this.Nome, acao, ConnectionString);
               if (!(dt == null))
               {
                   if (dt.Rows.Count > 0)
                   {
                       for (int x = 0; x < dt.Rows.Count; x++)
                       {
                           DepartamentoTO item = new DepartamentoTO(false);
                           item.Codigo = int.Parse( dt.Rows[x]["CODIGO"].ToString());
                           item.Email = dt.Rows[x]["EMAIL"].ToString();
                           item.Ramal = int.Parse(dt.Rows[x]["RAMAL"].ToString());
                           item.Nome = dt.Rows[x]["NOME"].ToString();
                       }
                   }
               }
               return lista_dados;
               }
               catch (Exception ex)
               {

               throw ex;
               }
        }
예제 #3
0
 public PessoaTO(bool conbd, bool instanciadependentes)
 {
     if (conbd)
     {
         this._dao = new PessoaDAO();
     }
     if (instanciadependentes)
     {
         this._departamento = new DepartamentoTO(false);
     }
 }
예제 #4
0
 public TipoProblemaTO(bool conbd, bool instanciadependent)
 {
     if (conbd)
     {
         this._dao = new TipoProblemaDAO();
     }
     if (instanciadependent)
     {
         this._departamento = new DepartamentoTO(false);
         this._sla          = new SLATO(false);
     }
 }
예제 #5
0
        public TipoProblemaTO(bool conbd, bool instanciadependente)
        {
            if (conbd)
            {
                this._dao = new TipoProblemaDAO();

            }
            if (instanciadependente)
            {

                this._sla = new SLATO(false);
                this._departamento = new DepartamentoTO(false);
            }
        }