public ActionResult GetDocumentInfo(int docID)
        {
            IUploadFilesservice fileClient = new IUploadFilesservice();

            TEDocument document = new TEDocument();
            TESignature[] signatures = new TESignature[0];

            string sessionID = (String)Session["sessionID"];
            string sessionKey = (String)Session["sessionKey"];

            fileClient.GetEDocInfo(sessionID, sessionKey, docID, ref document, ref signatures);

            EDocument doc = new EDocument();
            doc.DocID = docID;
            doc.FileName = document.FileName;
            doc.IDDocument = document.IDDocument;
            doc.IDParent = document.IDParent;
            doc.NameDocument = document.NameDocument;
            doc.TypeDocument = document.TypeDocument;
            doc.FileSize = document.FileSize;

            ESignature[] signs = new ESignature[signatures.Length];
            for (int i = 0; i < signatures.Length; i++)
            {
                signs[i] = new ESignature(DateTimeUtils.DoubleToDateTime(signatures[i].DateSignature).ToString("dd.MM.yyyy HH:mm:ss"),
                    signatures[i].IDDigitalSignature, signatures[i].IDDocument, signatures[i].IDPerson, signatures[i].Signature,
                    signatures[i].SubjectString, signatures[i].ValidSignature ? "Подпись верна" : "Подпись неверна");
            }

            doc.Signatures = signs;

            return Json(doc);
        }
Ejemplo n.º 2
0
        public ActionResult DownloadDocument(int id)
        {
            IUploadFilesservice fileClient = new IUploadFilesservice();
            IUploadFiles.TEDocument document = new IUploadFiles.TEDocument();
            IUploadFiles.TEDContent content = new IUploadFiles.TEDContent();
            TESignature[] signatures = new TESignature[0];

            fileClient.GetEDoc((string)Session["sessionID"], (string)Session["sessionKey"], id, ref document, ref content, false, ref signatures);
            byte[] file = Convert.FromBase64String(content.Content);
            return File(file, "application/binary", document.FileName);
        }
Ejemplo n.º 3
0
 /// <remarks/>
 public void GetEDocInfoAsync(string SessionID, string SessionKey, int DocID, TEDocument Doc, TESignature[] Signatures, object userState) {
     if ((this.GetEDocInfoOperationCompleted == null)) {
         this.GetEDocInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEDocInfoOperationCompleted);
     }
     this.InvokeAsync("GetEDocInfo", new object[] {
                 SessionID,
                 SessionKey,
                 DocID,
                 Doc,
                 Signatures}, this.GetEDocInfoOperationCompleted, userState);
 }
Ejemplo n.º 4
0
 /// <remarks/>
 public void GetEDocInfoAsync(string SessionID, string SessionKey, int DocID, TEDocument Doc, TESignature[] Signatures) {
     this.GetEDocInfoAsync(SessionID, SessionKey, DocID, Doc, Signatures, null);
 }
Ejemplo n.º 5
0
 public bool GetEDocInfo(string SessionID, string SessionKey, int DocID, ref TEDocument Doc, ref TESignature[] Signatures) {
     object[] results = this.Invoke("GetEDocInfo", new object[] {
                 SessionID,
                 SessionKey,
                 DocID,
                 Doc,
                 Signatures});
     Doc = ((TEDocument)(results[1]));
     Signatures = ((TESignature[])(results[2]));
     return ((bool)(results[0]));
 }
Ejemplo n.º 6
0
 /// <remarks/>
 public void GetEDocAsync(string SkessionID, string SessionKey, int DocID, TEDocument Doc, TEDContent DocContent, bool WithSignatures, TESignature[] Signatures) {
     this.GetEDocAsync(SkessionID, SessionKey, DocID, Doc, DocContent, WithSignatures, Signatures, null);
 }
Ejemplo n.º 7
0
 public bool GetEDoc(string SkessionID, string SessionKey, int DocID, ref TEDocument Doc, ref TEDContent DocContent, bool WithSignatures, ref TESignature[] Signatures) {
     object[] results = this.Invoke("GetEDoc", new object[] {
                 SkessionID,
                 SessionKey,
                 DocID,
                 Doc,
                 DocContent,
                 WithSignatures,
                 Signatures});
     Doc = ((TEDocument)(results[1]));
     DocContent = ((TEDContent)(results[2]));
     Signatures = ((TESignature[])(results[3]));
     return ((bool)(results[0]));
 }