我修改了我的代码仍然是我得到错误该做什么.... [英] i have modified my code like this still i m getting error what to do ....

查看:80
本文介绍了我修改了我的代码仍然是我得到错误该做什么....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public class Service1 : IService1
    {
        public DataSet GetEmployeerid()
        {
            String strConnection = ConfigurationManager.ConnectionStrings["MyConsString"].ConnectionString;
            SqlConnection conn = new SqlConnection(strConnection);
            SqlCommand cmd = new SqlCommand("select * from Employeertable where Employeerid=@Employeerid ", conn);
             conn.Open();
            SqlDataAdapter da=new SqlDataAdapter(cmd);            
             DataSet ds = new DataSet ();
             da.Fill(ds);
             return ds ;
            
}





错误:



''Employee.Service1''没有实现接口成员''Employee.IService1.GetEmployee(string)''

推荐答案

船长Obvious说:实现这个界面。 :-)



-SA
Captain Obvious says: implement this interface. :-)

—SA


[OperationContract]

DataSet GetEmployeerid();



并使用system.data添加程序集;
[OperationContract]
DataSet GetEmployeerid();

and add assembly using system.data;


错误表示它的含义。你的主题是没有意义的,如果这是一个旧的问题,编辑它,以便人们可以看到。



你的界面包含你的类没有实现的方法。它用简单的英语说。您需要一个GetEmployee方法才能显示整个界面。
The error means what it says. Your subject line is meaningless, if this is about an old question, edit it so people can see.

Your interface contains a method that your class does not implement. It says that in plain English. You need a GetEmployee method to have the whole interface present.


这篇关于我修改了我的代码仍然是我得到错误该做什么....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆