예제 #1
0
 /// <summary>
 /// The relative url (rest resource) of the entity type
 /// </summary>
 internal virtual string GetRelativeUrl(PenneoConnector con)
 {
     return(con.ServiceLocator.GetInstance <RestResources>().GetResource(GetType(), Parent));
 }
예제 #2
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 /// <summary>
 /// Get file assets with the given name for this entity
 /// </summary>
 protected byte[] GetFileAssets(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetFileAssets(this, assetName));
 }
예제 #3
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 protected T GetAsset <T>(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetAsset <T>(this, assetName));
 }
예제 #4
0
 /// <summary>
 /// Activate the case file
 /// </summary>
 public bool Activate(PenneoConnector con)
 {
     return(PerformAction(con, ACTION_ACTIVATE).Success);
 }
예제 #5
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 /// <summary>
 /// Get entity linked with this entity based on url
 /// </summary>
 protected QuerySingleObjectResult <T> GetLinkedEntity <T>(PenneoConnector con, string url = null)
     where T : Entity
 {
     return(con.ApiConnector.GetLinkedEntity <T>(this, url));
 }
예제 #6
0
 /// <summary>
 /// Get all available case file templates
 /// </summary>
 public QueryResult <CaseFileTemplate> GetTemplates(PenneoConnector con)
 {
     return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes"));
 }
예제 #7
0
 /// <summary>
 /// Get all errors associated with the case file
 /// </summary>
 public IEnumerable <string> GetErrors(PenneoConnector con)
 {
     return(GetStringListAsset(con, "errors"));
 }
예제 #8
0
 public IEnumerable <LogEntry> GetEventLog(PenneoConnector con)
 {
     return(GetLinkedEntities <LogEntry>(con).Objects);
 }
예제 #9
0
 public RestConnector(PenneoConnector con)
 {
     _con = con;
 }
예제 #10
0
 public string GetLink(PenneoConnector con)
 {
     return(GetTextAssets(con, ASSET_LINK));
 }
예제 #11
0
 public ValidationContents GetContents(PenneoConnector con)
 {
     return(GetAsset <ValidationContents>(con, ASSET_CONTENTS));
 }
예제 #12
0
 public byte[] GetPdf(PenneoConnector con)
 {
     return(GetFileAssets(con, ASSET_PDF));
 }
예제 #13
0
        /// <summary>
        /// Get request data from the entity as a property->value dictionary
        /// </summary>
        public Dictionary <string, object> GetRequestData(PenneoConnector con)
        {
            var values = IsNew ? GetMapping(con).GetCreateValues(this) : GetMapping(con).GetUpdateValues(this);

            return(values);
        }
예제 #14
0
 /// <summary>
 /// The entity type mapping
 /// </summary>
 internal IMapping GetMapping(PenneoConnector con)
 {
     return(con.ServiceLocator.GetInstance <Mappings>().GetMapping(GetType()));
 }
예제 #15
0
 public IEnumerable <Customer> GetCustomers(PenneoConnector con)
 {
     return(_customers ?? (_customers = GetLinkedEntities <Customer>(con).Objects.ToList()));
 }
예제 #16
0
파일: Query.cs 프로젝트: lhotrifork/sdk-net
 public Query(PenneoConnector con)
 {
     _con = con;
 }
예제 #17
0
 public IEnumerable <CaseFileTemplate> GetCaseFileTemplates(PenneoConnector con)
 {
     return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes").Objects);
 }
예제 #18
0
 internal override string GetRelativeUrl(PenneoConnector con)
 {
     return("/casefiles/" + CaseFileId + "/signers/" + SignerId + "/signertypes/" + SignerTypeId);
 }
예제 #19
0
 /// <summary>
 /// Get all available documents types for this case file
 /// </summary>
 public IEnumerable <DocumentType> GetDocumentTypes(PenneoConnector con)
 {
     return(GetLinkedEntities <DocumentType>(con, "casefiles/" + Id + "/documenttypes").Objects);
 }
예제 #20
0
 public bool AddCaseFile(PenneoConnector con, CaseFile caseFile)
 {
     return(LinkEntity(con, caseFile));
 }
예제 #21
0
 /// <summary>
 /// Send the case file for signing
 /// </summary>
 public bool Send(PenneoConnector con)
 {
     return(PerformAction(con, ACTION_SEND).Success);
 }
예제 #22
0
 public bool RemoveCaseFile(PenneoConnector con, CaseFile caseFile)
 {
     return(UnlinkEntity(con, caseFile));
 }
예제 #23
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 /// <summary>
 /// Get the latest server result for the entity
 /// </summary>
 public ServerResult GetLatestServerResult(PenneoConnector con)
 {
     return(con.ApiConnector.GetLatestEntityServerResult(this));
 }
예제 #24
0
 public bool AddValidation(PenneoConnector con, Validation validation)
 {
     return(LinkEntity(con, validation));
 }
예제 #25
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 /// <summary>
 /// Find a specific linked entity
 /// </summary>
 protected T FindLinkedEntity <T>(PenneoConnector con, int id)
 {
     return(con.ApiConnector.FindLinkedEntity <T>(this, id));
 }
예제 #26
0
 public bool RemoveValidation(PenneoConnector con, Validation validation)
 {
     return(UnlinkEntity(con, validation));
 }
예제 #27
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 /// <summary>
 /// Get text assets with the given name for this entity
 /// </summary>
 protected string GetTextAssets(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetTextAssets(this, assetName));
 }
예제 #28
0
 public bool SetSigner(PenneoConnector con, Signer signer)
 {
     Signer = signer;
     return(LinkEntity(con, Signer));
 }
예제 #29
0
파일: Entity.cs 프로젝트: klinkby/sdk-net
 /// <summary>
 /// Get list of string asset with the given name for this entity
 /// </summary>
 protected IEnumerable <string> GetStringListAsset(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetStringListAsset(this, assetName));
 }
예제 #30
0
 /// <summary>
 /// Perform the given action on this entity
 /// </summary>
 protected ServerResult PerformAction(PenneoConnector con, string action)
 {
     return(con.ApiConnector.PerformAction(this, action));
 }