string fullpath = @"C:\Users\0380003020\Desktop\平面.png";//文件路径

                System.IO.FileStream fs = new System.IO.FileStream(fullpath, System.IO.FileMode.Open);

                byte[] imagebytes = new byte[fs.Length];

                System.IO.BinaryReader br = new System.IO.BinaryReader(fs);

                imagebytes = br.ReadBytes(Convert.ToInt32(fs.Length));
                fs.Close();
                CfgFileResource obj = new CfgFileResource();
                obj.Rid = 0;
                obj.ResourceBody = imagebytes;
                obj.ResourceName = "3#3楼A区.png";
                obj.ResourcePath = "Plan/Global/";
                obj.UpdateTime = DateTime.Now;
                CfgFileResourceDao.Save(obj);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案