Exemple #1
0
        public void localizar()
        {
            try
            {
                objDAL = new SubGrupoDAL();
                this.sg_codigo = objDAL.localizar(this.sg_codigo);
                objDAL = null;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #2
0
        public void alterar()
        {
            try
            {
                objDAL = new SubGrupoDAL();
                objDAL.alterar(this.sg_codigo, this.sg_descricao, this.sg_grupo);
                objDAL = null;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #3
0
        public void excluir()
        {
            try
            {
                objDAL = new SubGrupoDAL();
                objDAL.excluir(this.sg_codigo);
                objDAL = null;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #4
0
        public void inserir()
        {
            try
            {
                objDAL = new SubGrupoDAL();
                objDAL.inserir(this.sg_descricao, this.sg_grupo);
                objDAL = null;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #5
0
        public DataTable localizarEmTudo(String descricao)
        {
            try
            {
                DataTable tab;
                objDAL = new SubGrupoDAL();
                tab = objDAL.localizarEmTudo(descricao);
                objDAL = null;
                return tab;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #6
0
        public DataTable localizarComRetorno(String descricao, String atributo)
        {
            try
            {
                DataTable tab;
                objDAL = new SubGrupoDAL();
                tab = objDAL.localizar(descricao, atributo);
                objDAL = null;
                return tab;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #7
0
        public void localizarProxAnterior(String descricao, int codigo)
        {
            try
            {
                DataTable tab = null;
                objDAL = new SubGrupoDAL();
                tab = objDAL.localizarProxAnterior(descricao, codigo);
                if (tab.Rows.Count > 0)
                    this.sg_codigo = int.Parse(tab.Rows[0][0].ToString());
                objDAL = null;
            }
            catch (Exception)
            {

                throw;
            }
        }
Exemple #8
0
        public void localizarPrimeiroUltimo(String descricao)
        {
            try
            {
                DataTable tab = null;
                int codigo = 0;
                objDAL = new SubGrupoDAL();
                tab = objDAL.localizarPrimeiroUltimo(descricao);
                if (tab.Rows.Count > 0)
                    int.TryParse(tab.Rows[0][0].ToString(), out codigo);
                this.sg_codigo = codigo;
                objDAL = null;
            }
            catch (Exception)
            {

                throw;
            }

        }
Exemple #9
0
        public void localizar(String descricao, String atributo)
        {

            try
            {
                DataTable tab;
                objDAL = new SubGrupoDAL();
                tab = objDAL.localizar(descricao, atributo);
                if (tab.Rows.Count > 0)
                {
                    this.sg_codigo = int.Parse(tab.Rows[0]["sg_codigo"].ToString());
                    this.sg_descricao = tab.Rows[0]["sg_descricao"].ToString();
                    this.sg_grupo = int.Parse(tab.Rows[0]["sg_grupo"].ToString());
                }
                objDAL = null;
            }
            catch (Exception)
            {
                throw;
            }
        }