예제 #1
0
        public void FieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e)
        {
            if (e.NewValue != null)
            {
                if (e.NewValue is byte[][])
                {
                    return;
                }

                var fileStream = new SparseMemoryStream();
                var gZipStream = new GZipStream(fileStream, CompressionMode.Compress);
                PXReflectionSerializer.Serialize(gZipStream, e.NewValue, false);

                gZipStream.Close();
                fileStream.Close();
                e.NewValue = fileStream.GetBuf();
            }
        }
예제 #2
0
 public virtual void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e)
 {
     if (e.ReturnValue != null)
     {
         byte[][] buffer = (byte[][])e.ReturnValue;
         using (var s = new GZipStream(
                    new SparseMemoryStream(buffer), CompressionMode.Decompress))
         {
             try
             {
                 e.ReturnValue = PXReflectionSerializer.Deserialize(s);
             }
             catch
             {
             }
         }
     }
     e.ReturnState = PXStringState.CreateInstance(
         e.ReturnState,            //value
         typeof(byte[][]),         //dataType
         false,                    //isKey
         true,                     //nullable
         null,                     //required
         null,                     //precision
         -1,                       //length
         null,                     //defaultValue
         _FieldName,               //fieldName
         null,                     //descriptionName
         null,                     //displayName
         null,                     //error
         PXErrorLevel.Undefined,   //errorLevel
         null,                     //enabled
         null,                     //visible
         null,                     //readOnly
         PXUIVisibility.Undefined, //visibility
         null,                     //viewName
         null,                     //fieldList
         null                      //headerList
         );
 }
 public PXRedirectToGIWithParametersRequiredException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
 public override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     PXReflectionSerializer.GetObjectData(this, info);
     base.GetObjectData(info, context);
 }
예제 #5
0
 public NoApplicableSourceException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
 public PXMassProcessException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
예제 #7
0
 public PXCommandPreparingException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
예제 #8
0
 public PXForeignRecordDeletedException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
예제 #9
0
 public PXSetPropertyKeepPreviousException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
예제 #10
0
 public PXSetupNotEnteredException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }
예제 #11
0
 public PXUndefinedCompanyException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     PXReflectionSerializer.RestoreObjectProps(this, info);
 }