//界面层代码
HIS.BLL.publicsqltagBll sqltag=new publicsqltagBll(); this.textEdit_sex.Properties.DataSource = sqltag.GetList(91, "", "", "", "");
this.textEdit_sex.Properties.DisplayMember = "名称";
this.textEdit_sex.Properties.ValueMember = "性别码";
this.textEdit_sex.Properties.NullText = "";
//BLL层代码
public DataSet GetList(int strtagno, string strwhere1, string strwhere2, string strwhere3, string strwhere4)
{
return dal.GetList(strtagno, strwhere1, strwhere2, strwhere3, strwhere4);
}
//Dal代码
public DataSet GetList(int strtagno, string strwhere1, string strwhere2, string strwhere3, string strwhere4)
{
string strsql = "SELECT sql FROM wh_tag_sql WHERE tag="+strtagno.ToString();
Database db = DatabaseFactory.CreateDatabase();
object obj = db.ExecuteScalar(CommandType.Text, strsql); StringBuilder strSql1 = new StringBuilder();
strSql1 = strSql1.Append(obj.ToString());
strSql1.Replace(":py_code", "'" + strwhere1 + "%'");
strSql1.Replace(":d_code", "'" + strwhere2 + "%'");
strSql1.Replace(":code", "'" + strwhere3 + "%'");
strSql1.Replace(":name", "'" + strwhere4 + "%'"); Database db1 = DatabaseFactory.CreateDatabase();
return db1.ExecuteDataSet(CommandType.Text, strSql1.ToString());
}请叫高手,界面层this.textEdit_sex中为何无返回的数据?
HIS.BLL.publicsqltagBll sqltag=new publicsqltagBll(); this.textEdit_sex.Properties.DataSource = sqltag.GetList(91, "", "", "", "");
this.textEdit_sex.Properties.DisplayMember = "名称";
this.textEdit_sex.Properties.ValueMember = "性别码";
this.textEdit_sex.Properties.NullText = "";
//BLL层代码
public DataSet GetList(int strtagno, string strwhere1, string strwhere2, string strwhere3, string strwhere4)
{
return dal.GetList(strtagno, strwhere1, strwhere2, strwhere3, strwhere4);
}
//Dal代码
public DataSet GetList(int strtagno, string strwhere1, string strwhere2, string strwhere3, string strwhere4)
{
string strsql = "SELECT sql FROM wh_tag_sql WHERE tag="+strtagno.ToString();
Database db = DatabaseFactory.CreateDatabase();
object obj = db.ExecuteScalar(CommandType.Text, strsql); StringBuilder strSql1 = new StringBuilder();
strSql1 = strSql1.Append(obj.ToString());
strSql1.Replace(":py_code", "'" + strwhere1 + "%'");
strSql1.Replace(":d_code", "'" + strwhere2 + "%'");
strSql1.Replace(":code", "'" + strwhere3 + "%'");
strSql1.Replace(":name", "'" + strwhere4 + "%'"); Database db1 = DatabaseFactory.CreateDatabase();
return db1.ExecuteDataSet(CommandType.Text, strSql1.ToString());
}请叫高手,界面层this.textEdit_sex中为何无返回的数据?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货