error CS0246: 未能找到类型或命名空间名称“BLL”(是否缺少 using 指令或程序集引用?)

codesmallfish 2017-08-15 03:19:23
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL; //标识有红线
namespace Winform
{
public partial class FormLogin : Form
{
public FormLogin()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string userName = txtUserName.Text.Trim();
string password = txtUserPassword.Text.Trim();
if (userName == "" || password == "")
{
MessageBox.Show("用户名或密码不能为空!");
txtUserName.Focus();
return;
}
else
{
BLL.User user = new BLL.User();
if (user.Login(userName, password))
{
UserHelper.userName = txtUserName.Text.Trim();
UserHelper.password = txtUserPassword.Text.Trim();
this.Hide();
FormMain f = new FormMain();
f.Show();
}
else
{

MessageBox.Show("用户名或密码错误,请重新输入!", "错误");
txtUserName.Text = "";
txtUserPassword.Text = "";
txtUserName.Focus();
}
}
}

private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
...全文
529 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
codesmallfish 2017-08-15
  • 打赏
  • 举报
回复
我是刚接触三层架构,不太明白你说的在添加引用上找到BLL对应的dll
引用 1 楼 duanzi_peng 的回复:
右键 “引用” -》 “添加引用” 找到BLL对应的Dll 添加进来。 找个三层教程,认真的看看,理解它们之间的关系,谁依赖谁,而不是不明不白的写代码。
引用 1 楼 duanzi_peng 的回复:
右键 “引用” -》 “添加引用” 找到BLL对应的Dll 添加进来。 找个三层教程,认真的看看,理解它们之间的关系,谁依赖谁,而不是不明不白的写代码。
lyh520yy 2017-08-15
  • 打赏
  • 举报
回复
推荐一本关于C#的教材书给你,在里面对你的问题有很好的解答《C#数据库应用程序开发技术与案例教程》
exception92 2017-08-15
  • 打赏
  • 举报
回复
右键 “引用” -》 “添加引用” 找到BLL对应的Dll 添加进来。 找个三层教程,认真的看看,理解它们之间的关系,谁依赖谁,而不是不明不白的写代码。

110,546

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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