예제 #1
0
        public void deleteFormulario(int id, string tabela)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("delete from");
            sql.Append(" " + tabela + " ");
            sql.Append("where id=" + id + " ");

            ConexaoAdo.ExecutaSql(sql.ToString());
        }
예제 #2
0
        public void delete(int id)
        {
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append("Delete from TbImagem ");
                sql.Append("where id=" + id + " ");

                ConexaoAdo.ExecutaSql(sql.ToString());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }
예제 #3
0
        public void update(int id, string nro_linha, string nro_contrato, bool atendido)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("update TbFormulario ");
            sql.Append("set nro_linha='" + nro_linha + "' ");
            sql.Append(",nro_contrato='" + nro_contrato + "' ");

            if (atendido)
            {
                sql.Append(",atendido='true' ");
            }

            sql.Append("where id=" + id + " ");

            ConexaoAdo.ExecutaSql(sql.ToString());
        }