当前位置: 首页>>代码示例>>C#>>正文


C# DocumentType.ToString方法代码示例

本文整理汇总了C#中DocumentType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentType.ToString方法的具体用法?C# DocumentType.ToString怎么用?C# DocumentType.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DocumentType的用法示例。


在下文中一共展示了DocumentType.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetDocumentsForForeignObject

        public BasicDocument[] GetDocumentsForForeignObject(DocumentType documentType, int foreignId)
        {
            List<BasicDocument> result = new List<BasicDocument>();

            using (DbConnection connection = GetMySqlDbConnection())
            {
                connection.Open();

                DbCommand command =
                    GetDbCommand(
                        "SELECT Documents.DocumentId,Documents.ServerFileName,Documents.ClientFileName,Documents.Description,DocumentTypes.Name AS DocumentType,Documents.ForeignId,Documents.FileSize,Documents.UploadedByPersonId,Documents.UploadedDateTime From Documents,DocumentTypes " +
                        "WHERE Documents.DocumentTypeId=DocumentTypes.DocumentTypeId AND " +
                        "Documents.ForeignId = " + foreignId + " AND " +
                        "DocumentTypes.Name = '" + documentType.ToString() + "';", connection);

                using (DbDataReader reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        result.Add(ReadDocumentFromDataReader(reader));
                    }

                    return result.ToArray();
                }
            }
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:26,代码来源:Database-Documents.cs

示例2: GetPath

        public String GetPath(String baseFolder, DocumentType documentType)
        {
            String path = null;
            DocSet docSet = this.DocSet;

            switch (documentType) {
            case DocumentType.Generated:
                path = Path.Combine (baseFolder, documentType.ToString (), this.assembly);
                Directory.CreateDirectory (Path.GetDirectoryName (path));
                break;
            default:
                break;
            }

            return path;
        }
开发者ID:Monobjc,项目名称:monobjc-tools,代码行数:16,代码来源:Framework.Extensions.cs

示例3: CreateDocument

 private static XDocument CreateDocument(DocumentType type)
 {
     return new XDocument(
         new XElement(
             type.ToString(),
             new XAttribute("version", _versionString)));
 }
开发者ID:billings7,项目名称:EscherTilier,代码行数:7,代码来源:FileStorage.cs

示例4: CreateDocument

        public int CreateDocument(string serverFileName, string clientFileName, long fileSize, string description, DocumentType documentType, int foreignId, int uploadedByPersonId)
        {
            using (DbConnection connection = GetMySqlDbConnection())
            {
                connection.Open();

                DbCommand command = GetDbCommand("CreateDocument", connection);
                command.CommandType = CommandType.StoredProcedure;

                // HACK - this bypasses the DB abstraction layer -- debug code to find out why
                // CreateDocument only gets 4 parameters from the DB abstraction layer, when
                // we give it 8

                command.Parameters.Add(new MySqlParameter("serverFileName", serverFileName));
                command.Parameters.Add(new MySqlParameter("clientFileName", clientFileName));
                command.Parameters.Add(new MySqlParameter("description", description));
                command.Parameters.Add(new MySqlParameter("docTypeString", documentType.ToString()));
                command.Parameters.Add(new MySqlParameter("foreignId", foreignId));
                command.Parameters.Add(new MySqlParameter("fileSize", fileSize));
                command.Parameters.Add(new MySqlParameter("uploadedByPersonId", uploadedByPersonId));
                command.Parameters.Add(new MySqlParameter("uploadedDateTime", DateTime.UtcNow));

                /*
                AddParameterWithName(command, "serverFileName", serverFileName);
                AddParameterWithName(command, "clientFileName", clientFileName);
                AddParameterWithName(command, "description", description);
                AddParameterWithName(command, "docTypeString", documentType.ToString());
                AddParameterWithName(command, "foreignId", foreignId);
                AddParameterWithName(command, "fileSize", fileSize);
                AddParameterWithName(command, "uploadedByPersonId", uploadedByPersonId);
                AddParameterWithName(command, "uploadedDateTime", DateTime.Now);*/

                return Convert.ToInt32(command.ExecuteScalar());
            }
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:35,代码来源:Database-Documents.cs

示例5: SetDocumentForeignObject

        public void SetDocumentForeignObject(int documentId, DocumentType newDocumentType, int newForeignId)
        {
            using (DbConnection connection = GetMySqlDbConnection())
            {
                connection.Open();

                DbCommand command = GetDbCommand("SetDocumentForeignObject", connection);
                command.CommandType = CommandType.StoredProcedure;

                AddParameterWithName(command, "documentId", documentId);
                AddParameterWithName(command, "newDocumentTypeString", newDocumentType.ToString());
                AddParameterWithName(command, "newForeignId", newForeignId);

                command.ExecuteNonQuery();
            }
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:16,代码来源:Database-Documents.cs

示例6: GenerateFirstPage

        public byte[] GenerateFirstPage(bool? isCorporation, Guid pRef, string logoPathFileName, DocumentType pType, string docTitle, string ownerName, string logoAlign)
        {
            Foxit.PDF.Document.AddLicense("FGN10NPSFJ3NIENDBQAhEYH7Lnw6aN3EPdVsY6K17yfDAMgA+J1aWeRq0RYcA5IzDqjZbvIixFuPLyBaVpLk9vcnyu1cg3ZrXmQA");
            Foxit.PDF.Document doc = new Foxit.PDF.Document();

            Page p = new Page();
            doc.Pages.Add(p);

            AddBackgroungImagePage(p);
            //Logo
            AddLogo(logoPathFileName, logoAlign, p);


            // float y = 260;
            float y = 380;
            switch (pType)
            {
                case DocumentType.LM:

                    AddWhiteTitlePage("LETTRE DE MISSION", p, y, 240, 60, 260, 20);
                    if (isCorporation.Value)
                        AddWhiteTitlePage("PERSONNE MORALE", p, y += 45, 500, 20, 0, 12);
                    else
                        AddWhiteTitlePage("PERSONNE PHYSIQUE", p, y += 45, 500, 20, 0, 12);
                    break;

                case DocumentType.RM:
                    AddWhiteTitlePage("RAPPORT DE MISSION", p, y, 240, 60, 260, 20);
                    break;

                case DocumentType.RTO:
                    AddWhiteTitlePage("Convention de Réception Transmission d’Ordres", p, y, 240, 80, 260, 14);
                    AddWhiteTitlePage("RTO", p, y += 15 * 2.3f, 500, 20, 0, 12);
                    break;

                case DocumentType.BS: //présentation de l'etablissement
                    AddWhiteTitlePage("Présentation de l'établissement", p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.DER:
                    AddWhiteTitlePage("Document d'entrée en relation", p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.AX:
                    AddWhiteTitlePage(docTitle, p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.CPART:
                    AddWhiteTitlePage("Convention de Partenariat", p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.CINT:
                    AddWhiteTitlePage("Convention Internet", p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.CCOURT:
                    AddWhiteTitlePage("Convention de Co-Courtage", p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.CCOMP:
                    AddWhiteTitlePage("Fiche de renseignement complémentaire", p, y, 240, 80, 260, 14);
                    break;

                case DocumentType.SF:
                    AddWhiteTitlePage("Bulletin de Souscription", p, y, 240, 80, 260, 14);
                    break;

            }
            
            AddWhiteBorderPage(y += 15 * 2f, p, 210, 290, 70);

            AddWhiteTitleLeftPage(DateTime.Now.ToShortDateString(), p, y += 10, 500, 11, 220, 10);
            AddWhiteTitleLeftPage(ownerName, p, y += 15, 500, 11, 220, 10);
            AddWhiteTitleLeftPage(string.Format("{0}-{1}", pType.ToString(), pRef), p, y += 15, 500, 11, 220, 10);


            //if (pType == DocumentType.LM || pType == DocumentType.RM)
            //{
            //    string[] rowContents = { string.Format("Le {0}", DateTime.Now.ToShortDateString()) //Date de maj ou Date de création
            //                            , string.Format("{0}-{1}", pType.ToString(), pRef) 
            //                            , name
            //                           };
            //    LM_AddTableTitle(p, rowContents, 90, y += 50);
            //}
            //else
            //{
            //    string[] rowContents = { string.Format("Le {0}", DateTime.Now.ToShortDateString()) //Date de maj ou Date de création
            //                             , string.Format("{0}-{1}", pType.ToString(), pRef) 
            //                           };
            //    LM_AddTableTitle(p, rowContents, 90, y += 50);
            //}

            //if (pType == DocumentType.LM || pType == DocumentType.RM)
            //{
            //    AddRecueil_Notes_Rectangle(y += 120, 105, 375, 30);
            //    AddReceuil_DetailText_Justify_Calibri_Label(name, y + 5, 300, 20, 120);
            //}

            return doc.Draw();
        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:100,代码来源:FoxitPDFGenerator.cs

示例7: BuildProviderDocumentPath

        public static string BuildProviderDocumentPath(string firmInstitutionSDGName, Guid firmInstitutionSDGId, DocumentType documentType, bool useUploadFolderAsRoot)
        {
            var locationType = UploadLocationType.FirmInstitution.ToString();

            var relativepath = string.Format("{0}/{1}/{2}_{3}/{4}", locationType, UploadLocationType.SDG.ToString(), FileManager.GetCorrectFileName(firmInstitutionSDGName), firmInstitutionSDGId, documentType.ToString());

            return CreateDirectory(relativepath, useUploadFolderAsRoot);
        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:8,代码来源:ElectronicSafeDocumentBL.cs

示例8: BuildSignatureDocumentPath

        public static string BuildSignatureDocumentPath(DocumentType documentType, string cgpName, string cgpId, bool isConventionDoc, out string newFilename, out string relativePath)
        {
            var languageData = Utility.PageLanguageHelper.GetLanguageContent("User", "Convention");
            newFilename = isConventionDoc ? languageData.GetContent("col_convention") : languageData.GetContent("col_avenant");
            
            switch (documentType)
            {
                //Partenariat
                case DocumentType.CPART :
                case DocumentType.APART :
                    newFilename = string.Format(@"{0}_partenariat_{1}.pdf", newFilename, DateTime.Now.ToString("ddMMyyyy_HHmmss"));
                    break;
                //Internet
                case DocumentType.CINT:
                case DocumentType.AINT:
                    newFilename = string.Format(@"{0}_internet_{1}.pdf", newFilename, DateTime.Now.ToString("ddMMyyyy_HHmmss"));
                    break;
                //Co courtage
                case DocumentType.CCOURT:
                case DocumentType.ACOURT:
                    newFilename = string.Format(@"{0}_cocourtage_{1}.pdf", newFilename, DateTime.Now.ToString("ddMMyyyy_HHmmss"));
                    break;
                //Fiche de renseignement complementaire
                case DocumentType.CCOMP:
                //case DocumentType.ACOMP:
                    newFilename = string.Format(@"{0}_fiche_complementaire_{1}.pdf", newFilename, DateTime.Now.ToString("ddMMyyyy_HHmmss"));
                    break;
                //Mandat de demarche
                case DocumentType.CMD:
                    newFilename = string.Format(@"{0}_mandat_de_demarche_{1}.pdf", newFilename, DateTime.Now.ToString("ddMMyyyy_HHmmss"));
                    break;

                case DocumentType.AVENANT :
                    newFilename = string.Format(@"{0}_{1}.pdf", newFilename, DateTime.Now.ToString("ddMMyyyy_HHmmss"));
                    break;

            }

            newFilename = newFilename.ToLower();
            
            relativePath = string.Format("{0}/{1}_{2}/{3}", "FirmInstitution/CGP", FileManager.GetCorrectFileName(cgpName), cgpId, documentType.ToString());

            return CreateDirectory(relativePath, true);

        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:45,代码来源:ElectronicSafeDocumentBL.cs

示例9: GetDocuments

 /// <summary>
 /// Récupére les documents par type de document à partir d'un liste de docs donné
 /// </summary>
 /// <param name="pTypeDocument"></param>
 /// <param name="pUser"></param>
 /// <returns></returns>
 public static List<ElectronicSafeDocument> GetDocuments(DocumentType pDocumentTypePrefix, List<ElectronicSafeDocument> pList)
 {
     string documentType = pDocumentTypePrefix.ToString();
     return pList.Where(doc => doc.DocumentType.DocumentNamePrefix == documentType).ToList();
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:11,代码来源:ElectronicSafeDocumentBL.cs


注:本文中的DocumentType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。