Exemple #1
0
 private static void ResetHasDlpDetectedClassifications(Attachment attachment)
 {
     if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment))
     {
         attachment.Delete(AttachmentSchema.HasDlpDetectedClassifications);
         attachment.Save();
     }
 }
        public IHttpActionResult DeleteClosingCost(Guid id, Guid attId)
        {
            var entity = _db.ClosureWOCheckList.Find(id);

            ProjectInfo.UnFinishNode(entity.ProjectId, FlowCode.Closure_WOCheckList, NodeCode.Closure_WOCheckList_ClosingCost);

            Attachment.Delete(attId);
            return(Ok(NodeCode.Closure_WOCheckList_ClosingCost));
        }
Exemple #3
0
        public int SendMassEmail(MassEmailSendArgs args)
        {
            var sma = MassEmail.CreateSendMessageArgs(args);

            SendMessage(sma);
            Attachment.Delete(args.Attachments);
            var result = sma.GetDistinctEmails().Length;

            return(result);
        }
        public void CanDeleteAttachment()
        {
            // Arrange.
            Attachment file = CreateAttachment();

            Assert.That(Attachment.All().Count(), Is.EqualTo(1));

            // Act.
            Attachment.Delete(file.ID);

            // Assert.
            Assert.That(Attachment.All().Count(), Is.EqualTo(0));
        }
 public IHttpActionResult RemoveRecordAttachment(Attachment att)
 {
     using (TransactionScope tranScope = new TransactionScope())
     {
         att.Delete();
         var fileName = HttpContext.Current.Server.MapPath("~/") + "UploadFiles/" + att.InternalName;
         if (File.Exists(fileName))
         {
             File.Delete(fileName);
         }
         tranScope.Complete();
     }
     return(Ok());
 }
        public IHttpActionResult Delete(Guid id, string projectId = "", Guid?requirementId = null)
        {
            var result = Attachment.Delete(id);

            //TempClosure流程 删除TempClosure Agreement
            if (requirementId.Equals(new Guid("EA0ED677-8CC1-4628-9A76-0462D4409CBE")))
            {
                ProjectInfo.UnFinishNode(projectId, FlowCode.TempClosure_LegalReview, NodeCode.TempClosure_LegalReview_Input);
            }
            //Closure流程
            else if (requirementId.Equals(new Guid("8b086d16-b65b-412f-9e81-013566f732ff")))
            {
                ProjectInfo.UnFinishNode(projectId, FlowCode.Closure_LegalReview, NodeCode.Closure_LegalReview_UploadAgreement);
            }
            else if (requirementId.Equals(new Guid("5ef6f0f9-0177-4f1e-bf84-f081462dc6d7")))
            {
                ProjectInfo.UnFinishNode(projectId, FlowCode.Closure_WOCheckList, NodeCode.Closure_WOCheckList_ClosingCost);
            }
            return(Ok());
        }
Exemple #7
0
        public IHttpActionResult DeleteAttachment(Guid AttachmentId)
        {
            var result = Attachment.Delete(AttachmentId);

            return(Ok());
        }