zoukankan      html  css  js  c++  java
  • winform用户控件使用数据库dal层的问题

    我写了个winform的用户控件,里面调用了用企业库写的dal方法,比如getNamebyId之类的,然后编后后拖入其他winform窗口里面报错.


    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Data;
    using System.Text;
    using System.Windows.Forms;
    using Haoting.DAL;
    using Haoting.BLL;

    namespace Haoting.UI
    {
        public partial class UserControl1 : UserControl
        {
            public UserControl1()
            {
                InitializeComponent();
                ProjectManager pm = new ProjectManager();
                label1.Text = pm.GetById("{8676E22F-1B62-4760-BF33-B8D44D4BB634}").Tables[0].Rows[0][0].ToString();
            }
        }
    }
    报错的图:

    最后得出结论,控件出问题了

  • 相关阅读:
    tps,qps
    JS打包与代码分割
    css module
    垃圾回收算法、内存管理
    css flex布局
    angularJS transclude
    JS模块之AMD, CMD, CommonJS、UMD和ES6模块
    js event loop事件循环
    bootstrap3之栅格系统
    viewport理解
  • 原文地址:https://www.cnblogs.com/emilchan/p/1052165.html
Copyright © 2011-2022 走看看