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

  • 相关阅读:
    CSS箭头
    rails 路由正则表达式
    centos6.7 配置MongoDB日志
    centos6.7 配置Elasticsearch
    拼音纠错
    Pandas学习笔记
    WebService using Spring throwed org.xml.sax.SAXException: Bad envelope tag: htm
    怎样让Windows任务管理器CPU占用率呈现正玄曲线(解释+C#实现)
    Deepin Linux获得关注,国产GUI值得提倡
    Swing组件的另类嵌套
  • 原文地址:https://www.cnblogs.com/cwfsoft/p/1760943.html
Copyright © 2011-2022 走看看