示例#1
0
        public static string CriarDoc(string CategoryID, string matricula, string Indice, string ColunaA, string ColunaB, string ColunaC_Empresa, string ColunaD, string ColunaE_Dtdesligamento, string ColunaF, string ColunaG, string ColunaH, string ColunaI, string ColunaJ, string ColunaK, string ColunaL, string ColunaM, string ColunaN, string ColunaO, string ColunaP)
        {
            try
            {
                var AttributeSituacaodoc       = "";
                var Valor_AttributeSituacaodoc = "";

                var AttributeMatriculaDoc = "";
                var V_Atributo2           = matricula;

                var    user        = "";
                string FormatoData = "";

                #region DadosXML

                string AtribDocColunaA = "";
                string AtribDocColunaB = "";
                string AtribDocColunaC = "";
                string AtribDocColunaD = "";
                string AtribDocColunaE = "";
                string AtribDocColunaF = "";
                string AtribDocColunaG = "";
                string AtribDocColunaH = "";
                string AtribDocColunaI = "";
                string AtribDocColunaJ = "";
                string AtribDocColunaK = "";
                string AtribDocColunaL = "";
                string AtribDocColunaM = "";
                string AtribDocColunaN = "";
                string AtribDocColunaO = "";
                string AtribDocColunaP = "";

                XDocument doc   = XDocument.Load((CaminhoDadosXML(caminho) + @"System.net.cnfg.xml"));
                var       prods = from p in doc.Descendants("Config")
                                  select new
                {
                    AttributeMatriculaDoc      = p.Element("AttributeMatriculaDoc").Value,
                    AttributeSituacaodoc       = p.Element("AttributeSituacaodoc").Value,
                    Valor_AttributeSituacaodoc = p.Element("Valor_AttributeSituacaodoc").Value,
                    IdUsuario       = p.Element("IdUsuario").Value,
                    FormatoData     = p.Element("FormatoData").Value,
                    AtribDocColunaA = p.Element("AtribDocColunaA").Value,
                    AtribDocColunaB = p.Element("AtribDocColunaB").Value,
                    AtribDocColunaC = p.Element("AtribDocColunaC").Value,
                    AtribDocColunaD = p.Element("AtribDocColunaD").Value,
                    AtribDocColunaE = p.Element("AtribDocColunaE").Value,
                    AtribDocColunaF = p.Element("AtribDocColunaF").Value,
                    AtribDocColunaG = p.Element("AtribDocColunaG").Value,
                    AtribDocColunaH = p.Element("AtribDocColunaH").Value,
                    AtribDocColunaI = p.Element("AtribDocColunaI").Value,
                    AtribDocColunaJ = p.Element("AtribDocColunaJ").Value,
                    AtribDocColunaK = p.Element("AtribDocColunaK").Value,
                    AtribDocColunaL = p.Element("AtribDocColunaL").Value,
                    AtribDocColunaM = p.Element("AtribDocColunaM").Value,
                    AtribDocColunaN = p.Element("AtribDocColunaN").Value,
                    AtribDocColunaO = p.Element("AtribDocColunaO").Value,
                    AtribDocColunaP = p.Element("AtribDocColunaP").Value,
                };

                foreach (var p in prods)
                {
                    AttributeSituacaodoc       = p.AttributeSituacaodoc;
                    Valor_AttributeSituacaodoc = p.Valor_AttributeSituacaodoc;
                    AttributeMatriculaDoc      = p.AttributeMatriculaDoc;
                    user            = p.IdUsuario;
                    FormatoData     = p.FormatoData;
                    AtribDocColunaA = p.AtribDocColunaA;
                    AtribDocColunaB = p.AtribDocColunaB;
                    AtribDocColunaC = p.AtribDocColunaC;
                    AtribDocColunaD = p.AtribDocColunaD;
                    AtribDocColunaE = p.AtribDocColunaE;
                    AtribDocColunaF = p.AtribDocColunaF;
                    AtribDocColunaG = p.AtribDocColunaG;
                    AtribDocColunaH = p.AtribDocColunaH;
                    AtribDocColunaI = p.AtribDocColunaI;
                    AtribDocColunaJ = p.AtribDocColunaJ;
                    AtribDocColunaK = p.AtribDocColunaK;
                    AtribDocColunaL = p.AtribDocColunaL;
                    AtribDocColunaM = p.AtribDocColunaM;
                    AtribDocColunaN = p.AtribDocColunaN;
                    AtribDocColunaO = p.AtribDocColunaO;
                    AtribDocColunaP = p.AtribDocColunaP;

                    if (AtribDocColunaA == "")
                    {
                        ColunaA = "";
                    }
                    if (AtribDocColunaB == "")
                    {
                        ColunaB = "";
                    }
                    if (AtribDocColunaC == "")
                    {
                        ColunaC_Empresa = "";
                    }
                    if (AtribDocColunaD == "")
                    {
                        ColunaD = "";
                    }
                    if (AtribDocColunaE == "")
                    {
                        ColunaE_Dtdesligamento = "";
                    }
                    if (AtribDocColunaF == "")
                    {
                        ColunaF = "";
                    }
                    if (AtribDocColunaG == "")
                    {
                        ColunaG = "";
                    }
                    if (AtribDocColunaH == "")
                    {
                        ColunaH = "";
                    }
                    if (AtribDocColunaI == "")
                    {
                        ColunaI = "";
                    }
                    if (AtribDocColunaJ == "")
                    {
                        ColunaJ = "";
                    }
                    if (AtribDocColunaK == "")
                    {
                        ColunaK = "";
                    }
                    if (AtribDocColunaL == "")
                    {
                        ColunaL = "";
                    }
                    if (AtribDocColunaM == "")
                    {
                        ColunaM = "";
                    }
                    if (AtribDocColunaN == "")
                    {
                        ColunaN = "";
                    }
                    if (AtribDocColunaO == "")
                    {
                        ColunaO = "";
                    }
                    if (AtribDocColunaP == "")
                    {
                        ColunaP = "";
                    }
                }

                #endregion

                string StrAtribut = (AttributeSituacaodoc + "=" + Valor_AttributeSituacaodoc + ";"
                                     + AttributeMatriculaDoc + "=" + V_Atributo2 + ";"
                                     + AtribDocColunaA + "=" + ColunaA + ";"
                                     + AtribDocColunaB + "=" + ColunaB + ";"
                                     + AtribDocColunaC + "=" + ColunaC_Empresa + ";"
                                     + AtribDocColunaD + "=" + ColunaD + ";"
                                     + AtribDocColunaE + "=" + ColunaE_Dtdesligamento + ";"
                                     + AtribDocColunaF + "=" + ColunaF + ";"
                                     + AtribDocColunaG + "=" + ColunaG + ";"
                                     + AtribDocColunaH + "=" + ColunaH + ";"
                                     + AtribDocColunaI + "=" + ColunaI + ";"
                                     + AtribDocColunaJ + "=" + ColunaJ + ";"
                                     + AtribDocColunaK + "=" + ColunaK + ";"
                                     + AtribDocColunaL + "=" + ColunaL + ";"
                                     + AtribDocColunaM + "=" + ColunaM + ";"
                                     + AtribDocColunaM + "=" + ColunaN + ";"
                                     + AtribDocColunaN + "=" + ColunaO + ";"
                                     + AtribDocColunaP + "=" + ColunaP);

                string ATTRIBUTTES = StrAtribut.Replace("=;=;=;=;=", "").Replace("=;", "").Replace("=;=", "").Replace("=;=;=", "").Replace("=;=;=;=", "").Replace(";=", "");

                string DTDOCUMENT = Convert.ToString(System.DateTime.Now.ToString(FormatoData));

                //string StrAtribut = (AttributeSituacaodoc + "=" + Valor_AttributeSituacaodoc + ";" + AttributeMatriculaDoc + "=" + V_Atributo2);

                int FGMODEL = 1;

                string CategIndice = CategoryID + @"-" + Indice;

                SEClient newDoc          = Conection.GetConnection();
                var      resultadoNewDoc = newDoc.newDocument(CategoryID, CategIndice, "", "", DTDOCUMENT, ATTRIBUTTES, user, null, FGMODEL, null);

                string Identific = "";

                if (resultadoNewDoc.ToString().Substring(0, 2).Contains("0:"))
                {
                    File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_erro_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | " + matricula + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");
                    return("false");
                }
                else
                {
                    File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | " + matricula + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");
                    Identific = resultadoNewDoc.Substring(3).Replace(": Documento criado com sucesso", "");
                }
                IDCriaDoc = 1;
                return(Identific);
            }
            catch (Exception ex)
            {
                while (IDCriaDoc <= 2)
                {
                    IDCriaDoc++;
                    File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_erro_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | CriarPastaDoc | " + ex.Message.ToString() + @";");
                    Thread.Sleep(Convert.ToInt32(5000));
                    return(CriarDoc(CategoryID, matricula, Indice, ColunaA, ColunaB, ColunaC_Empresa, ColunaD, ColunaE_Dtdesligamento, ColunaF, ColunaG, ColunaH, ColunaI, ColunaJ, ColunaK, ColunaL, ColunaM, ColunaN, ColunaO, ColunaP));
                }
                return("false");
            }
        }
示例#2
0
            public static string CriarDoc(string Identificador, string IDCATEGORY, string Titulo, string IDUSER, string PosAtr1, string PosAtr2, string PosAtr3, string PosAtr4, string PosAtr5, string PosAtr6, string PosAtr7, string PosAtr8, string PosAtr9, string PosAtr10, string item)
            {
                string nome = Path.GetFileName(item);

                try
                {
                    //NAME_ATRIBUTE
                    //var AtributoCPF = ConfigurationManager.AppSettings["AtributoCPF"];
                    var Atributo1  = ConfigurationManager.AppSettings["Atributo1"];
                    var Atributo2  = ConfigurationManager.AppSettings["Atributo2"];
                    var Atributo3  = ConfigurationManager.AppSettings["Atributo3"];
                    var Atributo4  = ConfigurationManager.AppSettings["Atributo4"];
                    var Atributo5  = ConfigurationManager.AppSettings["Atributo5"];
                    var Atributo6  = ConfigurationManager.AppSettings["Atributo6"];
                    var Atributo7  = ConfigurationManager.AppSettings["Atributo7"];
                    var Atributo8  = ConfigurationManager.AppSettings["Atributo8"];
                    var Atributo9  = ConfigurationManager.AppSettings["Atributo9"];
                    var Atributo10 = ConfigurationManager.AppSettings["Atributo10"];
                    var DSRESUME   = ConfigurationManager.AppSettings["DSRESUME"];


                    //ATRIBUTE_VALORES_FIXO
                    var V_Atributo1  = ConfigurationManager.AppSettings["V_Atributo1"];
                    var V_Atributo2  = ConfigurationManager.AppSettings["V_Atributo2"];
                    var V_Atributo3  = ConfigurationManager.AppSettings["V_Atributo3"];
                    var V_Atributo4  = ConfigurationManager.AppSettings["V_Atributo4"];
                    var V_Atributo5  = ConfigurationManager.AppSettings["V_Atributo5"];
                    var V_Atributo6  = ConfigurationManager.AppSettings["V_Atributo6"];
                    var V_Atributo7  = ConfigurationManager.AppSettings["V_Atributo7"];
                    var V_Atributo8  = ConfigurationManager.AppSettings["V_Atributo8"];
                    var V_Atributo9  = ConfigurationManager.AppSettings["V_Atributo9"];
                    var V_Atributo10 = ConfigurationManager.AppSettings["V_Atributo10"];
                    var IDUSERFIXED  = ConfigurationManager.AppSettings["IDUSERFIXED"];

                    if (IDUSER == "")
                    {
                        IDUSER = IDUSERFIXED;
                    }

                    string FormatoData = ConfigurationManager.AppSettings["FormatoData"];
                    string DTDOCUMENT  = Convert.ToString(System.DateTime.Now.ToString(FormatoData));

                    //string STEP = ConfigurationManager.AppSettings["STEP"];


                    int FGMODEL = 1;


                    //if (Atributo1 != "")
                    //{
                    //    PosAtr1 = Convert.ToUInt64(PosAtr1).ToString(@"000\.000\.000\-00");
                    //}
                    //Atributo6 = "";

                    //string PosAtrAJust = PosAtr1;
                    //Atributo6 = "";
                    //PosAtr6 = "";

                    //participantsData[] participantsData = new participantsData[1];
                    //participantsData[0] = new participantsData
                    //{
                    //    STEP = STEP,

                    //};



                    string StrAtribut = (Atributo1 + "=" + PosAtr1 + "" + V_Atributo1 + ";"
                                         + Atributo2 + "=" + PosAtr2 + "" + V_Atributo2 + ";"
                                         + Atributo3 + "=" + PosAtr3 + "" + V_Atributo3 + ";"
                                         + Atributo4 + "=" + PosAtr4 + "" + V_Atributo4 + ";"
                                         + Atributo5 + "=" + PosAtr5 + "" + V_Atributo5 + ";"
                                         + Atributo6 + "=" + PosAtr6 + "" + V_Atributo6 + ";"
                                         + Atributo7 + "=" + PosAtr7 + "" + V_Atributo7 + ";"
                                         + Atributo8 + "=" + PosAtr8 + "" + V_Atributo8 + ";"
                                         + Atributo9 + "=" + PosAtr9 + "" + V_Atributo9 + ";"
                                         + Atributo10 + "=" + PosAtr10 + "" + V_Atributo10 + ";"
                                         );

                    //string Titulo1 = Titulo + " - " + PosAtr2 + "-" + PosAtr3;

                    string ATTRIBUTTES = StrAtribut.Replace("=;=;=;=;=", "").Replace("=;", "").Replace("=;=", "").Replace("=;=;=", "").Replace("=;=;=;=", "");

                    SEClient newDoc          = Conection.GetConnection();
                    var      resultadoNewDoc = newDoc.newDocument(IDCATEGORY, Identificador, Titulo, DSRESUME, DTDOCUMENT, ATTRIBUTTES, IDUSER, null, FGMODEL, null);

                    Thread.Sleep(1000);

                    if (Identificador == "")
                    {
                        Identificador = resultadoNewDoc.Substring(3).Replace(": Documento criado com sucesso", "");
                    }

                    if (resultadoNewDoc[0].ToString().Contains("0"))
                    {
                        File.AppendAllText(logpath + @"\" + "log_erro.txt", "\r\n" + DateTime.Now + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");

                        if (File.Exists(PastaArquivos + "\\" + Path.GetFileName(item)))
                        {
                            File.Delete(PastaArquivos + "\\" + Path.GetFileName(item));
                        }
                        File.Move(item, string.Concat(PastaArquivos, "\\", Path.GetFileName(item)));

                        EnviaEmail(resultadoNewDoc.Substring(3), nome);

                        return("false");
                    }
                    else
                    {
                        File.AppendAllText(logpath + @"\" + "log.txt", "\r\n" + DateTime.Now + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");
                    }
                    iCriar = 1;
                    return(Identificador);
                }
                catch (Exception ex)
                {
                    while (iCriar <= 2)
                    {
                        iCriar++;
                        File.AppendAllText(logpath + @"\" + "log_erro.txt", "\r\n" + DateTime.Now + @" | CriarDoc " + @" | " + nome + @" | " + ex.Message.ToString() + @";");
                        Thread.Sleep(Convert.ToInt32(IntervalReturn));
                        return(CriarDoc(Identificador, IDCATEGORY, Titulo, IDUSER, PosAtr1, PosAtr2, PosAtr3, PosAtr4, PosAtr5, PosAtr6, PosAtr7, PosAtr8, PosAtr9, PosAtr10, item));
                    }
                    //File.AppendAllText(logpath + @"\" + "log_erro.txt", "\r\n" + DateTime.Now + @" | CriarDoc " + ex.Message.ToString() + @";");

                    if (File.Exists(PastaArquivos + "\\" + Path.GetFileName(item)))
                    {
                        File.Delete(PastaArquivos + "\\" + Path.GetFileName(item));
                        EnviaEmail(ex.Message.ToString(), nome);
                    }
                    File.Move(item, string.Concat(PastaArquivos, "\\", Path.GetFileName(item)));
                    EnviaEmail(ex.Message.ToString(), nome);
                    iCriar = 1;
                    return("false");
                }
            }
示例#3
0
        public static string CreateFolder(string matricula, string nome, string ColunaC_Empresa, string ColunaD, string ColunaE_Dtdesligamento, string ColunaF, string ColunaG, string ColunaH, string ColunaI, string ColunaJ, string ColunaK, string ColunaL, string ColunaM, string ColunaN, string ColunaO, string ColunaP, string Indice)
        {
            try
            {
                #region DadosXML
                var ColunaA_MatriculaPasta = "";
                var AttributeNome          = "";
                var AttributeEmpresa       = "";
                var vColunaD = "";
                var AttributeDtdesligamento = "";
                var vColunaF = "";
                var vColunaG = "";
                var vColunaH = "";
                var vColunaI = "";
                var vColunaJ = "";

                var vColunaK = "";
                var vColunaL = "";
                var vColunaM = "";
                var vColunaN = "";
                var vColunaO = "";
                var vColunaP = "";

                string IDCATEGORY  = "";
                string IDUSER      = "";
                string FormatoData = "";
                string EditAtrib   = "";


                XDocument doc   = XDocument.Load((CaminhoDadosXML(caminho) + @"System.net.cnfg.xml"));
                var       prods = from p in doc.Descendants("Config")
                                  select new
                {
                    ColunaA_MatriculaPasta = p.Element("ColunaA_MatriculaPasta").Value,
                    ColunaB_Nome           = p.Element("ColunaB_Nome").Value,
                    ColunaC_Empresa        = p.Element("ColunaC_Empresa").Value,
                    ColunaD_Dtadmissao     = p.Element("ColunaD_Dtadmissao").Value,
                    ColunaE_Dtdesligamento = p.Element("ColunaE_Dtdesligamento").Value,
                    ColunaF = p.Element("ColunaF").Value,
                    ColunaG = p.Element("ColunaG").Value,
                    ColunaH = p.Element("ColunaH").Value,
                    ColunaI = p.Element("ColunaI").Value,
                    ColunaJ = p.Element("ColunaJ").Value,
                    ColunaK = p.Element("ColunaK").Value,
                    ColunaL = p.Element("ColunaL").Value,
                    ColunaM = p.Element("ColunaM").Value,
                    ColunaN = p.Element("ColunaN").Value,
                    ColunaO = p.Element("ColunaO").Value,
                    ColunaP = p.Element("ColunaP").Value,

                    IDCategoriaPasta  = p.Element("IDCategoriaPasta").Value,
                    Categorychecklist = p.Element("Categorychecklist").Value,

                    StructPendenteID = p.Element("StructPendenteID").Value,
                    DigitosStructID  = p.Element("DigitosStructID").Value,

                    IdUsuario      = p.Element("IdUsuario").Value,
                    EditarCadastro = p.Element("EditarCadastro").Value,
                    FormatoData    = p.Element("FormatoData").Value,
                };

                foreach (var p in prods)
                {
                    ColunaA_MatriculaPasta = p.ColunaA_MatriculaPasta;
                    AttributeNome          = p.ColunaB_Nome;
                    AttributeEmpresa       = p.ColunaC_Empresa;
                    vColunaD = p.ColunaD_Dtadmissao;
                    AttributeDtdesligamento = p.ColunaE_Dtdesligamento;
                    vColunaF    = p.ColunaF;
                    vColunaG    = p.ColunaG;
                    vColunaH    = p.ColunaH;
                    vColunaI    = p.ColunaI;
                    vColunaJ    = p.ColunaJ;
                    vColunaK    = p.ColunaK;
                    vColunaL    = p.ColunaL;
                    vColunaM    = p.ColunaM;
                    vColunaN    = p.ColunaN;
                    vColunaO    = p.ColunaO;
                    vColunaP    = p.ColunaP;
                    IDCATEGORY  = p.IDCategoriaPasta;
                    IDUSER      = p.IdUsuario;
                    FormatoData = p.FormatoData;
                    EditAtrib   = p.EditarCadastro;
                }
                #endregion

                string DTDOCUMENT = Convert.ToString(System.DateTime.Now.ToString(FormatoData));

                string StrAtribut = (ColunaA_MatriculaPasta + "=" + matricula + ";"
                                     + AttributeNome + "=" + nome + ";"
                                     + AttributeEmpresa + "=" + ColunaC_Empresa + ";"
                                     + vColunaD + "=" + ColunaD + ";"
                                     + AttributeDtdesligamento + "=" + ColunaE_Dtdesligamento + ";"
                                     + vColunaF + "=" + ColunaF + ";"
                                     + vColunaG + "=" + ColunaG + ";"
                                     + vColunaH + "=" + ColunaH + ";"
                                     + vColunaI + "=" + ColunaI + ";"
                                     + vColunaJ + "=" + ColunaJ + ";"
                                     + vColunaK + "=" + ColunaK + ";"
                                     + vColunaL + "=" + ColunaL + ";"
                                     + vColunaM + "=" + ColunaM + ";"
                                     + vColunaN + "=" + ColunaN + ";"
                                     + vColunaO + "=" + ColunaO + ";"
                                     + vColunaP + "=" + ColunaP);

                string ATTRIBUTTES = StrAtribut.Replace("=;=;=;=;=", "").Replace(";=", "").Replace("=;=", "").Replace("=;=;=", "").Replace("=;=;=;=", "");


                int FGMODEL = 1;

                string Cat_Indice = IDCATEGORY + "-" + Indice;

                SEClient newFolder       = Conection.GetConnection();
                string   resultadoNewDoc = newFolder.newDocument(IDCATEGORY, Cat_Indice, "", "", DTDOCUMENT, ATTRIBUTTES, IDUSER, null, FGMODEL, null);

                IDCriate = 1;
                string strID = "";

                if (resultadoNewDoc.ToString().Substring(0, 2).Contains("0:"))
                {
                    //File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | " + matricula + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");
                    File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_erro_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | " + matricula + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");
                    //
                    if (EditAtrib == "Sim")
                    {
                        if (resultadoNewDoc.ToString().Contains("0: Identificador já existente.."))
                        {
                            string[] edd         = resultadoNewDoc.ToString().Split(new char[] { Convert.ToChar("[") });
                            string   idmatricula = edd[1].Replace("]", "");

                            foreach (var item in (ATTRIBUTTES.ToString().Split(new char[] { Convert.ToChar(";") })))
                            {
                                if (item == "")
                                {
                                    break;
                                }

                                string[] strNome = item.ToString().Split(new char[] { Convert.ToChar("=") });

                                string idattribute = strNome[0];
                                string vlattribute = strNome[1];
                                UpdateAtributos(idmatricula, idattribute, vlattribute);
                            }
                            UpdateTitulo(IDCATEGORY, idmatricula, nome);
                            File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | Atualizado dados no cadastro da Matricula " + idmatricula + @";");

                            return("false");
                        }
                    }

                    //File.AppendAllText(logpath + @"\" + "log.txt", "\r\n" + DateTime.Now + @" | " + matricula + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString() + @";");
                    MessageBox.Show(matricula + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString(), ".:: Atenção ::.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return("false");
                }
                else
                {
                    strID = resultadoNewDoc.Substring(3).Replace(": Documento criado com sucesso", "");
                    File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | " + matricula + @" | " + nome + @" | " + resultadoNewDoc.Substring(3).ToString().Replace("Documento", "Pasta") + @";");
                }


                return(strID);
            }
            catch (Exception ex)
            {
                while (IDCriate <= 2)
                {
                    IDCriate++;
                    File.AppendAllText(logCriarPastaFuncionario + @"\" + "log_erro_CriarPastaFuncionario.txt", "\r\n" + DateTime.Now + @" | CriarPastaDoc | " + ex.Message.ToString() + @";");
                    Thread.Sleep(Convert.ToInt32(7000));
                    return(CreateFolder(matricula, nome, ColunaC_Empresa, ColunaD, ColunaE_Dtdesligamento, ColunaF, ColunaG, ColunaH, ColunaI, ColunaJ, ColunaK, ColunaL, ColunaM, ColunaN, ColunaO, ColunaP, Indice));
                }
                return("false");
            }
            #endregion
        }