zoukankan      html  css  js  c++  java
  • 把照片写入到DataTable

    if (mydtzybr.Columns.Contains("image1") == true && mydtzybr.Columns.Contains("imgfile") == true)
    {
        string filename, filefull;
        for (int i = 0; i < mydtzybr.Rows.Count; i++)
        {
            filename = mydtzybr.Rows[0]["image1"].ToString();
            if (string.IsNullOrEmpty(filename) == false)
            {
                if (string.Compare(db_type, "db") == 0)
                {
                    filefull = Application.StartupPath + @"\uploadfile\" + filename;
                    if (System.IO.File.Exists(filefull) == true)
                    {
                        try
                        {
                            mydtzybr.Rows[0]["imgfile"] = cwfIosys.ioCtrl.ReadFile(filefull);
                        }
                        catch (Exception cw)
                        {
                            appctrl.lastErrorlev = 2;
                            appctrl.lastError = cw.Message;
                            appctrl.WriteErrLog(cw.Message, "写入住院病人图像数据");
                            appctrl.appruninglog.addlog("写入住院病人图像数据失败!" + cw.Message);
                        }
                    }
                }
            }
        }
        mydtzybr.AcceptChanges();
    }

  • 相关阅读:
    sosoapi的安装
    centos7 安装后,意外出现Please make your choice from above ['q' to quit | 'c' to continue | 'r' to refresh]
    crontab 每月最后一天执行命令
    svn的常用命令
    svn的安装与使用
    RPC简述
    REST简介
    VS2015 IIS Express 无法启动 解决办法
    NUnit的安装
    NUnit.Framework在VS2015中如何进行单元测试
  • 原文地址:https://www.cnblogs.com/cwfsoft/p/1760943.html
Copyright © 2011-2022 走看看