예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                log.Info("************************************************************************    INTITIATED EXPORT ************************************");
                treeView2.Nodes.Clear();
                assingtoConstants();
                IDownlodTaxonomy objDDl;
                Composite        objCmp;
                IExportDocs      objEXP;
                objDDl = new DownloadTaxonomy(new Guid(SITEGUID), TERMSTORE_NAME, new Guid(TERMSET_ID));

                objEXP = new ExportDocs(new Guid(SITEGUID), new Guid(WEBGUID), new Guid(LISTGUID), FieldName);

                if (objDDl.isValidState)
                {
                    objCmp = objDDl.getTaxonomy(languageCode);
                    log.Info(objCmp.CMChilds);
                    treeView2.Nodes.Add(bindHierarchy(objCmp));
                    objEXP.ExportDocuments(objCmp, FILE_PATH);
                }
                log.Info("************************************************************************    Completed EXPORT ************************************");
            }
            catch (Exception w)
            {
                log.Error(string.Format("{0}.{1}", MethodBase.GetCurrentMethod().DeclaringType.FullName, MethodBase.GetCurrentMethod().Name), w);
                throw;
            }
        }
예제 #2
0
        private void btnHierarchyPopulate_Click(object sender, EventArgs e)
        {
            try
            {
                treeView2.Nodes.Clear();
                assingtoConstants();
                IDownlodTaxonomy objDDl;
                Composite        objCmp;
                objDDl = new DownloadTaxonomy(new Guid(SITEGUID), TERMSTORE_NAME, new Guid(TERMSET_ID));
                if (objDDl.isValidState)
                {
                    log.Info("Inovkiing");

                    objCmp = objDDl.getTaxonomy(languageCode);
                    log.Info(objCmp.CMChilds);
                    treeView2.Nodes.Add(bindHierarchy(objCmp));
                }
            }
            catch (Exception w)
            {
                log.Error(string.Format("{0}.{1}", MethodBase.GetCurrentMethod().DeclaringType.FullName, MethodBase.GetCurrentMethod().Name), w);
                throw;
            }
        }