コード例 #1
0
        public List <object> gerenciaSLA(int acao, String ConnectionString)
        {
            try
            {
                lista_dados = new List <Object>();
                dt          = new DataTable();
                dt          = _dao.GerenciaSLA(this._codigosla, this._tempoatendimento, acao, ConnectionString);

                if (!(dt == null))
                {
                    if (dt.Rows.Count > 0)
                    {
                        if (acao != 2)
                        {
                            lista_dados.Add(dt.Rows[0][0].ToString());
                        }
                        else
                        {
                            for (int x = 0; x < dt.Rows.Count; x++)
                            {
                                SLATO item = new SLATO(false);
                                item.CodigoSLA        = int.Parse(dt.Rows[x]["CODIGO"].ToString());
                                item.TempoAtendimento = double.Parse(dt.Rows[x]["TEMPOATENDIMENTO"].ToString());
                                lista_dados.Add(item);
                            }
                        }
                    }
                }
                return(lista_dados);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
ファイル: SLATO.cs プロジェクト: fdspereira/wiseadmin
        public List<object> gerenciaSLA(int acao, String ConnectionString)
        {
            try
            {
                lista_dados = new List<object>();
                dt = new DataTable();
                dt = _dao.GerenciaSLA(this.CodigoSLA, this.TempoAtendimento, acao, ConnectionString);
                if (!(dt == null))
                {
                    if (dt.Rows.Count > 0)
                    {
                        if (acao != 2)
                        {
                            lista_dados.Add(dt.Rows[0][0].ToString());
                        }
                        else
                        {
                            for (int x = 0; x < dt.Rows.Count; x++)
                            {
                                SLATO item = new SLATO(false);
                                item.CodigoSLA = int.Parse(dt.Rows[x]["CODIGO"].ToString());
                                item.TempoAtendimento = double.Parse(dt.Rows[x]["TEMPOATENDIMENTO"].ToString());
                                lista_dados.Add(item);
                            }
                        }
                    }
                }
                return lista_dados;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="conbd">Se verdadeiro instancia DAO</param>
 /// <param name="instanciadependentes">Se verdadeiro instancia dependentes</param>
 public AcoesAdmSLATO(bool conbd, bool instanciadependentes)
 {
     if (conbd)
     {
         this._dao = new AcoesSlaDAO();
     }
     if (instanciadependentes)
     {
         this.AcaoAdm = new AcoesAdmTO(false);
         this.Sla     = new SLATO(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
ファイル: ProblemasTO.cs プロジェクト: reynaldus/wiseadmin
        public ProblemasTO(bool conbd, bool instanciadependentes)
        {
            if (conbd)
            {
                this._dao = new ProblemasDAO();
            }

            if (instanciadependentes)
            {
                this._sla          = new SLATO(false);
                this._tipoproblema = new TipoProblemaTO(false, true);
            }
        }
コード例 #6
0
ファイル: TipoProblemaTO.cs プロジェクト: reynaldus/wiseadmin
        public TipoProblemaTO(bool conbd, bool instanciadependente)
        {
            if (conbd)
            {
                this._dao = new TipoProblemaDAO();

            }
            if (instanciadependente)
            {

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