CompanyImage Tablosundan resmi fiziksel bir ortama aktarma

//Write EmplImage to File Path

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);

    }

}

//MUAMMER YİĞİT

 
Comment are closed.