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

  • 相关阅读:
    memcached事故
    总算会用sphinx生成文档了
    python tip
    抓包工具wireshark
    狗日的用户体验
    python tip
    pymmseg
    memcached事故
    windwos序列号
    7z fromat on ubuntu&replace my fujishu electric fan
  • 原文地址:https://www.cnblogs.com/cwfsoft/p/1760943.html
Copyright © 2011-2022 走看看