using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using 深度OAC.Data ;
using System.Windows.Forms;namespace 深度OAC
{
public partial class editdata : UserControl
{
public editdata()
{
InitializeComponent();
} public string tablename
{
get
{
return tablename ;
}
set
{
tablename = value;
}
} private void editdata_Load(object sender, EventArgs e)
{
string sql = "select * from " + tablename;
DBOperate.BindDataGridView(dataGridView1, sql);
}
}
}
在一个from中把自己的控件加入
并使用editdata.tablename="xxx"vs2008直接退出,没有任何提示,为干什么?
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using 深度OAC.Data ;
using System.Windows.Forms;namespace 深度OAC
{
public partial class editdata : UserControl
{
public editdata()
{
InitializeComponent();
} public string tablename
{
get
{
return tablename ;
}
set
{
tablename = value;
}
} private void editdata_Load(object sender, EventArgs e)
{
string sql = "select * from " + tablename;
DBOperate.BindDataGridView(dataGridView1, sql);
}
}
}
在一个from中把自己的控件加入
并使用editdata.tablename="xxx"vs2008直接退出,没有任何提示,为干什么?
{
get { return _tablename; }
set { _tablename = value; }
}
public string tablename
{
get
{
return _tablename;
}
set
{
_tablename = value;
}
} private void editdata_Load(object sender, EventArgs e)
{
string sql = "select * from " + _tablename;
}