Показать сообщение отдельно
Старый 03.11.2010, 16:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
fatihdemirci: CompanyImage Tablosundan resmi fiziksel bir ortama aktarma
Источник: http://www.fatihdemirci.net/index.ph...rtama-aktarma/
==============

//Write EmplImage to File Path

X++:
public static void  writeCompanyImageToFilePath(EmplId _emplId, str _filePath)
{
    #macrolib.File
    CompanyImage companyImage;
    EmplTable emplTable;
    Image myImg ;
    FileIOPermission permission;
  ;
    //find Employee
    emplTable = EmplTable::find(_emplId);
    //getting image from CompanyImage
   companyImage = CompanyImage::find(emplTable.dataAreaId, emplTable.TableId, emplTable.RecId);
    myImg = new Image(companyImage.Image);
    filePath= _filePath +"\\"+  _emplId + ".jpg";
    if(!System.IO.File::Exists(_filePath))
    {
        permission = new FileIOPermission(filePath, #io_write);
        permission.assert();
        myImg.saveImage(_filePath);
    }
}
Источник: http://www.fatihdemirci.net/index.ph...rtama-aktarma/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.