Пример #1
0
        protected virtual void SaveFile(FileInfo file)
        {
            const string FilesField = "NoteFiles";

            var person = Persons.Current;

            if (person?.Id != null)
            {
                try
                {
                    PXBlobStorage.SaveContext = new PXBlobStorageContext
                    {
                        NoteID   = person.Id,
                        ViewName = Persons.View.Name,
                        DataRow  = person,
                        Graph    = this
                    };

                    if (this.FileGraph.SaveFile(file, FileExistsAction.CreateVersion))
                    {
                        PXNoteAttribute.ForcePassThrow(Persons.Cache, null);

                        Persons.Cache.SetValueExt(person, FilesField, new Guid[] { file.UID.Value });
                    }
                }
                finally
                {
                    PXBlobStorage.SaveContext = null;
                }
            }
        }
Пример #2
0
        public BatchRelease()
        {
            GLSetup setup = GLSetup.Current;

            BatchList.SetProcessDelegate <PostGraph>(ReleaseBatch);
            BatchList.SetProcessCaption(Messages.ProcRelease);
            BatchList.SetProcessAllCaption(Messages.ProcReleaseAll);
            PXNoteAttribute.ForcePassThrow <Batch.noteID>(BatchList.Cache);
        }
        public BatchPost()
        {
            GLSetup setup = GLSetup.Current;

            BatchList.SetProcessDelegate <PostGraph>(
                delegate(PostGraph pg, Batch batch)
            {
                pg.Clear();
                pg.PostBatchProc(batch);
            }
                );
            BatchList.SetProcessCaption(Messages.ProcPost);
            BatchList.SetProcessAllCaption(Messages.ProcPostAll);
            PXNoteAttribute.ForcePassThrow <Batch.noteID>(BatchList.Cache);
        }