Пример #1
0
        public List<Object> gerenciaReqSoftwareTO(int acao, String ConnectionString)
        {
            try
            {
                lista_dados = new List<object>();
                dt = new System.Data.DataTable();
                dt = _dao.GerenciaReqSoftware(this._codigoreqsoftware, this._configminima, this._sistema, 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++)
                            {
                                ReqSoftwareTO item = new ReqSoftwareTO(false);
                                item.CodigoReqSoftware = int.Parse(dt.Rows[x]["CODIGOREQ_SOFTWARE"].ToString());
                                item.ConfigMinima = int.Parse(dt.Rows[x]["CONFIG_MINIMA"].ToString());
                                item.Sistema = int.Parse(dt.Rows[x]["SISTEMA"].ToString());
                                lista_dados.Add(item);
                            }
                        }
                    }
                }

                return lista_dados;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Пример #2
0
        public List <Object> gerenciaReqSoftwareTO(int acao, String ConnectionString)
        {
            try
            {
                lista_dados = new List <object>();
                dt          = new System.Data.DataTable();
                dt          = _dao.GerenciaReqSoftware(this._codigoreqsoftware, this._configminima, this._sistema, 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++)
                            {
                                ReqSoftwareTO item = new ReqSoftwareTO(false);
                                item.CodigoReqSoftware = int.Parse(dt.Rows[x]["CODIGOREQ_SOFTWARE"].ToString());
                                item.ConfigMinima      = int.Parse(dt.Rows[x]["CONFIG_MINIMA"].ToString());
                                item.Sistema           = int.Parse(dt.Rows[x]["SISTEMA"].ToString());
                                lista_dados.Add(item);
                            }
                        }
                    }
                }

                return(lista_dados);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }