コード例 #1
0
        public static DocsPaVO.documento.AnelloDocumentale getCatenaDoc(string idGruppo, string idPeople, string idProfile)
        {
            logger.Debug("getCatenaDoc");
            DocsPaVO.documento.AnelloDocumentale result = new DocsPaVO.documento.AnelloDocumentale();
            //DocsPaWS.Utils.Database db= DocsPaWS.Utils.dbControl.getDatabase();
            DocsPaDB.Query_DocsPAWS.Documenti doc = new DocsPaDB.Query_DocsPAWS.Documenti();
            System.Data.DataSet dataSet;
            //bool dbOpen=false;
            try
            {
                //db.openConnection();
                //dbOpen=true;

                //si trova la root del documento
                string idRoot = getIdRoot(idProfile);

                //si carica in una tabella l'albero relativo a tale root

                /*string alberoString="SELECT ID_DOCUMENTO,ID_DOC_COLLEGATO FROM DPA_DOC_COLLEGAMENTI WHERE ID_ROOT="+idRoot;
                 *          db.fillTable(alberoString,dataSet,"ALBERO");*/

                doc.GetCatenaDoc(out dataSet, idRoot);

                // TODO: sostituire con l'implementazione
                //       della gestione documentale
                result = buildCatena(idGruppo, idPeople, idRoot, dataSet.Tables["ALBERO"]);
            }
            catch (Exception e)
            {
                logger.Debug(e.Message);

                /*if(dbOpen)
                 * {
                 * db.closeConnection();
                 * }*/
                logger.Debug("Errore nella gestione della catena documento (getCatenaDoc)", e);
                throw new Exception("F_System");
            }
            return(result);
        }