先说下 重新生成、该类删除重新加入、新建工程将原来页面和类导入 都试过了
类是用codesmith自动生成的
上午还没什么事,下午不知道修改什么了出现这个问题
方法能点出来 但就是 提示 不包含该方法
IList<Role> list = RoleManager.GetAllRoles(); public static IList<Role> GetAllRoles()
{
string sqlAll = "SELECT * FROM Roles";
return GetRolesBySql( sqlAll );
}
private static IList<Role> GetRolesBySql( string safeSql )
{
List<Role> list = new List<Role>(); try
{
DataTable table = DBHelper.GetDataSet( safeSql );
foreach (DataRow row in table.Rows)
{
Role role = new Role();
role.RoleId = (int)row["roleId"];
role.RoleName = (string)row["roleName"];
role.OrderId = (int)row["orderId"];
role.Bz1 = (string)row["bz1"];
list.Add(role);
}
return list;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
throw e;
} }
希望大虾解决
类是用codesmith自动生成的
上午还没什么事,下午不知道修改什么了出现这个问题
方法能点出来 但就是 提示 不包含该方法
IList<Role> list = RoleManager.GetAllRoles(); public static IList<Role> GetAllRoles()
{
string sqlAll = "SELECT * FROM Roles";
return GetRolesBySql( sqlAll );
}
private static IList<Role> GetRolesBySql( string safeSql )
{
List<Role> list = new List<Role>(); try
{
DataTable table = DBHelper.GetDataSet( safeSql );
foreach (DataRow row in table.Rows)
{
Role role = new Role();
role.RoleId = (int)row["roleId"];
role.RoleName = (string)row["roleName"];
role.OrderId = (int)row["orderId"];
role.Bz1 = (string)row["bz1"];
list.Add(role);
}
return list;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
throw e;
} }
希望大虾解决
是否重新编译重新引用?