当前位置:编程学习 > C#/ASP.NET >>

求帮助:C#

错误 1 “StuInfDAL.StuInfoDB”不包含“GetStuInfo”的定义,并且找不到可接受类型为“StuInfDAL.StuInfoDB”的第一个参数的扩展方法“GetStuInfo”(是否缺少 using 指令或程序集引用?) I:\C#\学生信息管理系统2\StuInfom\StuInfBLL\StuInfoManager.cs 17 34 StuInfBLL
我的代码:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using StuInfDAL;

namespace StuInfBLL
{
    public class StuInfoManager
    {
        StuInfDAL.StuInfoDB studb=new StuInfoDB();    //查询所有学生的信息,返回一个DataTable
        public DataTable GetStuInfo()
        {
            DataTable dt = studb.GetStuInfo();
            return dt;
        }

        public DataTable GetStuInfo(string condition, string keywords)     //根据查询条件的值查询满足条件的学生信息,返回一个DataTable
        {
            switch (condition)
            {
                case "按学号查询":
                    {
                        return studb.GetStuInfoByStuld(keywords);
                    }
                case "按姓名查询":
                    {
                        return studb.GetStuInfoByName(keywords);
                    }
                default:
                    return studb.GetstuInfo();
            }
        }
    }
}
--------------------编程问答-------------------- StuInfDAL.StuInfoDB这个类,没有GetStuInfo这个函数,检查下函数名是否写错。 --------------------编程问答-------------------- 奥奥,,,明白了。。谢谢你
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,