FrmViewPhoto.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using LYFZ.Software.MainBusiness.DoorCityProcess;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. namespace LYFZ.Software.MainBusiness.InventoryManagement
  11. {
  12. public partial class FrmViewPhoto : LYFZ.Software.UI.InventoryManagement.FrmViewPhoto
  13. {
  14. public int ID;
  15. public FrmViewPhoto()
  16. {
  17. }
  18. #region 加载
  19. protected override void FrmViewPhoto_Shown(object sender, EventArgs e)
  20. {
  21. if (ID > 0)
  22. {
  23. LYFZ.BLL.BaseBLL.BaseBLL_ErpFixedAssetManagement bll = new BLL.BaseBLL.BaseBLL_ErpFixedAssetManagement();
  24. DataTable dt = bll.GetList("ID=" + ID + "").Tables[0];
  25. if (!string.IsNullOrEmpty(dt.Rows[0]["Fam_PhotoAlbum"].ToString()))
  26. {
  27. this.pictureBoxEx1.Image = PublicCodeClasses.GetImage(PublicCodeClasses.StringToByte(dt.Rows[0]["Fam_PhotoAlbum"].ToString()));
  28. }
  29. else { this.pictureBoxEx1.Image = null; }
  30. }
  31. }
  32. #endregion
  33. }
  34. }