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

  • 相关阅读:
    从零自学Java-10.充分利用现有对象
    读书笔记-读《代码大全》有感
    从零自学Java-9.描述对象
    从零自学Java-8.创建第一个对象
    随机森林理解
    百度 前端 rem 适配 和 阿里 前端 rem 适配
    移动端 轮播
    楼层 跟随 js与jq
    js 滚动到指定位置(带step 速度)
    js 事件流
  • 原文地址:https://www.cnblogs.com/cwfsoft/p/1760943.html
Copyright © 2011-2022 走看看