public object PostAddEditDocumentDef(DocumentDefDTO DocumentDefDTO)
        {
            using (DocumentDefService documentDefService = new DocumentDefService())
            {
                sysBpmsDocumentDef documentDef = DocumentDefDTO.ID != Guid.Empty ? documentDefService.GetInfo(DocumentDefDTO.ID) : new sysBpmsDocumentDef();
                documentDef.Update(DocumentDefDTO.DocumentFolderID, DocumentDefDTO.NameOf, DocumentDefDTO.DisplayName, DocumentDefDTO.MaxSize, DocumentDefDTO.ValidExtentions, DocumentDefDTO.IsMandatory, DocumentDefDTO.Description, DocumentDefDTO.IsSystemic, DocumentDefDTO.IsActive);
                ResultOperation resultOperation = null;
                if (documentDef.ID != Guid.Empty)
                {
                    resultOperation = documentDefService.Update(documentDef);
                }
                else
                {
                    resultOperation = documentDefService.Add(documentDef);
                }

                if (resultOperation.IsSuccess)
                {
                    return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success));
                }
                else
                {
                    return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error));
                }
            }
        }
 public object GetAddEditDocumentDef(Guid?id = null, Guid?documentFolderID = null)
 {
     if (!id.IsNullOrEmpty())
     {
         using (DocumentDefService documentDefService = new DocumentDefService())
         {
             return(new DocumentDefDTO(documentDefService.GetInfo(id.Value)));
         }
     }
     else
     {
         return(new DocumentDefDTO()
         {
             DocumentFolderID = documentFolderID.Value, IsActive = true
         });
     }
 }
        public object GetInActiveDocumentDef(Guid id)
        {
            using (DocumentDefService documentDefService = new DocumentDefService())
            {
                sysBpmsDocumentDef documentDef = documentDefService.GetInfo(id);
                documentDef.IsActive = false;
                ResultOperation resultOperation = documentDefService.Update(documentDef);

                if (resultOperation.IsSuccess)
                {
                    return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success));
                }
                else
                {
                    return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error));
                }
            }
        }