Be.Smart ERP Connector
(EN) ERP Connector
(EN) ERP Connector
  • â„šī¸What is ERP Connector?
  • âš™ī¸System Requirements
  • 🔑Installation & Activation Guide
  • 🆕What's New
    • Versions 30.1.0.6, 29.3.0.5, 28.8.0.5 & 27.14.0.5
    • Versions 30.0.0.3, 29.2.1.2, 28.7.3.3 & 27.13.0.5
    • Versions 28.7.1.1, 27.13.0.1
    • Versions 29.2.1.0, 28.7.1.0, 27.13.0.0
    • Versions 29.1.0.0, 28.6.0.0, 27.12.0.0
    • Versions 29.0.0.1 & 28.5.1.1
  • Data Interface - Reference Manual
    • Abbreviations
    • Data interface
      • Data tables, relations
        • Table EcENTITY
        • Table EcASSOC
        • Table EcLINK
        • Table EcLOG
        • Stored procedure EcWriteEntity
    • Exporting data from a Vault
      • Properties / Attributes
      • Associations
      • Links
      • Reading data from data interface
        • Workflow sample
        • Another samples
    • Importing data into a Vault
      • Mandatory EcENTITY table fields
      • Default values
      • LifeCycle States
      • Writing data into data interface
        • Using SQL Stored Procedure
          • Example #1 – insert single EcENTITY record
          • Example #2 – insert two associated EcENTITY records
        • Using SQL syntax
        • Using SQL Management Studio
    • SQL views
      • ERP data displayed dynamically in VE Tab
        • SQL view definition sample:
      • ERP synchronized enums
    • Logging
    • Using thumbnail image data
Powered by GitBook
On this page

Was this helpful?

  1. Data Interface - Reference Manual

Using thumbnail image data

There is an option to write image data for the exported Vault entity into the DI – EcENTITY.thumbnail. To save the image to disk, cast sql value as byte array and write this data as jpg file.

To get an .NET FRAMEWORK System.Drawing.Image object you can use this sample:

/// <summary>
/// 
http://justonesandzeros.typepad.com/blog/2011/05/viewing-thumbnails.html

/// </summary>
/// <param name="propVal">the value of the property Thumbnail</param>
/// <param name="width">image width</param>
/// <param name="height">image height</param>
/// <returns></returns>
public static System.Drawing.Image GetThumbnail(object propVal, int width, int height)
{
if (propVal == null || false == (propVal is byte[])) return null;
byte[] thumbnailRaw = (byte[])propVal; System.Drawing.Image retVal = null;
using (System.IO.MemoryStream ms = new System.IO.MemoryStream(thumbnailRaw))
{
try
{
}
ms.Seek(12, System.IO.SeekOrigin.Begin); System.Drawing.Imaging.Metafile metafile =
new System.Drawing.Imaging.Metafile(ms); retVal = metafile.GetThumbnailImage(width, height,
new System.Drawing.Image.GetThumbnailImageAbort(GetThumbnailImageAbort), System.IntPtr.Zero);
catch
{
retVal = null;
}
if (retVal == null)
{
try
{
}
ms.Seek(0, System.IO.SeekOrigin.Begin);
System.Drawing.Image rawImage = System.Drawing.Image.FromStream(ms, true); retVal = rawImage.GetThumbnailImage(width, height,
new System.Drawing.Image.GetThumbnailImageAbort(GetThumbnailImageAbort), System.IntPtr.Zero);
catch
{
retVal = null;
}
}
}
return retVal;
}
PreviousLogging

Last updated 1 year ago

Was this helpful?