private void gridView1_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "LargePhoto_Unbound")
     {
         GridView     view       = (GridView)sender;
         IList        dataSource = (IList)view.DataSource;
         ProductPhoto pf         = (ProductPhoto)dataSource[e.ListSourceRowIndex];
         if (pf == null)
         {
             return;
         }
         if (e.IsGetData)
         {
             e.Value = pf.LargePhoto.ToArray();
         }
         else if (e.IsSetData)
         {
             byte[] data = (byte[])e.Value;
             pf.LargePhoto = new System.Data.Linq.Binary(data);
         }
     }
 }
 partial void UpdateProductPhoto(ProductPhoto instance);
 partial void DeleteProductPhoto(ProductPhoto instance);
 partial void InsertProductPhoto(ProductPhoto instance);