高手帮忙!

luaiping 2003-04-11 01:41:18
在编译是产生如下错误:
类型或命名空间名称“businessules”在类或命名空间"yjs"中不存在(是否缺少程序集引用?)
...全文
32 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
luaiping 2003-04-11
  • 打赏
  • 举报
回复
up~
luaiping 2003-04-11
  • 打赏
  • 举报
回复
与这个相似的错误太多
luaiping 2003-04-11
  • 打赏
  • 举报
回复
出错处在: using yjs.Common.Data;
using yjs.Common;
using yjs.SystemFramework;
timmy3310 2003-04-11
  • 打赏
  • 举报
回复
它是说没有这个命名空间啊

你在别的地方定义了这个命名空间吗?没有的话,删了这一行
luaiping 2003-04-11
  • 打赏
  • 举报
回复
第九行

是 systemframework 在类或命名空间"yjs"中不存在(是否缺少程序集引用?)
timmy3310 2003-04-11
  • 打赏
  • 举报
回复
你报错的是哪一行?

我怎么没找到"businessules"这个东西,不是这个文件出错吧
luaiping 2003-04-11
  • 打赏
  • 举报
回复
up~
luaiping 2003-04-11
  • 打赏
  • 举报
回复
代码:(谢谢!)
namespace yjs.DataAccess
{
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Reflection;
using System.Text;
using yjs.Common.Data;
using yjs.Common;
using yjs.SystemFramework;

/// <summary>
/// Mark 的摘要说明。
/// </summary>
public class Mark: IDisposable
{
// Sql Command for Insert
private SqlDataAdapter dsCommand;

public Mark()
{
// Create the adapter
dsCommand = new SqlDataAdapter();
// Create the DataSetCommand SelectCommand
dsCommand.SelectCommand = new SqlCommand();
dsCommand.SelectCommand.Connection = new SqlConnection(Configuration.ConnectionString);
//
// Establish the mapping rules from the database columns to the dataset
//
// NOTE: Having the mappings allows the adapter to create the table and its
// columns directly in the dataset.
//
dsCommand.TableMappings.Add("Table",MarkData.CJ_TABLE);// TODO: 在此处添加构造函数逻辑
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(true); // as a service to those who might inherit from us
}
protected virtual void Dispose(bool disposing)
{
if (! disposing)
return; // we're being collected, so let the GC take care of this object
if (insertCommand != null)
{
if (insertCommand.Connection != null)
insertCommand.Connection.Dispose();
insertCommand.Dispose();
insertCommand = null;
}
}
public MarkData GetMarkByStudentId(String studentId)
{
return FillMarkData("GetMarkByStudentId", "@XH", studentId);
}
public MarkData GetMarkByLesson(String lesson)
{
return FillMarkData("GetMarkByLesson", "@KCMC", lesson);
}
public MarkData GetMarkByYear(String year)
{
return FillMarkData("GetMarkByYear", "@niandu", year);
}
public MarkData GetMarkByType(String type)
{
return FillMarkData("GetMarkByType", "@stu_type", type);
}

private MarkData FillMarkData(String commandText, String paramName, String paramValue)
{
if (dsCommand == null )
{
throw new System.ObjectDisposedException( GetType().FullName );
}
MarkData data = new MarkData();
SqlCommand command = dsCommand.SelectCommand;

command.CommandText = commandText;
command.CommandType = CommandType.StoredProcedure; // use stored proc for perf
SqlParameter param = new SqlParameter(paramName, SqlDbType.NVarChar, 255);
param.Value = paramValue;
command.Parameters.Add(param);

dsCommand.Fill(data);
return data;
}

}
}
zwztu 2003-04-11
  • 打赏
  • 举报
回复
代码?
timmy3310 2003-04-11
  • 打赏
  • 举报
回复
代码贴出来
luaiping 2003-04-11
  • 打赏
  • 举报
回复
up~~~

我想问一下这是怎么回事,小弟刚学,高手大哥帮忙啊!!

谢谢了~

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧