源码信息

最新源码评论

综合讨论 下载前咨询( 4 人) | 下载后讨论( 2 人 )

  • 评论者:莫西莫西9***
    莫西莫西9***(用户[下载于:2015-06-18 15:29]) 发表于:2015-06-18 16:17:41

    运行显示SA登陆失败是什么原因、

    0 个回复
  • 评论者:rainy***
    rainy***(用户) 发表于:2011-12-29 15:03:57

    怎么打开文件的?好像没有项目那个文件

    0 个回复
  • 评论者:a3760***
    a3760***(用户) 发表于:2010-08-24 16:24:00

    我是初学者,进来学习一下

    1 个回复
    • 回复者:diana***
      diana***(用户)回复于:2010-08-25 08:46:00

      楼主 这里的源码会帮助您技术的成长的!我们一起加油!

  • 评论者:itnes***
    itnes***(用户) 发表于:2010-05-04 16:05:00

    想问下,那个借书为什么一直是该用户已借满?还有程序没有连贯在一起,用户借书情况不能实现啊

    0 个回复
  • 评论者:佳天下***
    佳天下***(用户) 发表于:2009-01-01 23:46:00

    <span>第一次发帖子&nbsp; 恳求各位网友帮助。。下边的代码是我在</span><a href="http://www.51aspx.com/CV/MyLibary/" target="_blank"><span>http://www.51aspx.com/CV/MyLibary/</span></a><span> 下载的,进过调试后发现有问题---功能实现不了,只是提示 "借书失败!" 或是 "不存在该用户!";我不知道该怎么样改,真诚希望网友能给我改一下,解决我的难题!(QQ<a href="mailto:angel0608@126.com" target="_blank">******</a>)谢谢!!<br /> <br /> <br /> using System;<br /> using System.Data;<br /> using System.Configuration;<br /> using System.Collections;<br /> using System.Web;<br /> using System.Web.Security;<br /> using System.Web.UI;<br /> using System.Web.UI.WebControls;<br /> using System.Web.UI.WebControls.WebParts;<br /> using System.Web.UI.HtmlControls;<br /> using MyLibrary.BusinessLogicLayer;</span><br /> <span>public partial class Borrow_BorrowBook : System.Web.UI.Page<br /> {<br /> &nbsp; &nbsp; protected void Page_Load(object sender, EventArgs e)<br /> &nbsp; &nbsp; {</span><br /> <span>&nbsp; &nbsp; }<br /> &nbsp; &nbsp; //借阅按钮单击事件<br /> &nbsp; &nbsp; protected void imgBtnBorrow_Click(object sender, ImageClickEventArgs e)<br /> &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; if (Page.IsValid)<br /> &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Borrow borrow = new Borrow();//创建Borrow类对象<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Users user = new Users();//创建Users类对象<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user.UserID = txtUserID.Text.Trim();//为user对象属性UserID赋值<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int BorrowNum = 0;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (user.LoadData(user.UserID))//查询用户并取出用户权限<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int userPower = user.UserPower;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (userPower == 3)//学生<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BorrowNum = 10;//最大借书量10本<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borrow.BorrowEndDate = Convert.ToDateTime(System.DateTime.Now.AddMonths(1).ToString());//借阅时间</span><br /> <span>为1个月<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (userPower == 4)//教师<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BorrowNum = 20;//最大借书量20本<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borrow.BorrowEndDate = Convert.ToDateTime(System.DateTime.Now.AddMonths(3).ToString());//借阅时间</span><br /> <span>为1个月<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borrow.UserID = txtUserID.Text.Trim();<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int count = borrow.QueryCurrentBorrowCount(txtUserID.Text.Trim());//查询用户已经借阅图书量<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (count &lt; BorrowNum)//如果还没有超出最大借书量,借书<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borrow.BookID = int.Parse(txtBookID.Text.Trim());<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borrow.BorrowBeginDate = Convert.ToDateTime(System.DateTime.Now.ToString());<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borrow.BorrowState = 0;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (borrow.InsertByProc())//使用Borrow类InsertByProc方法插入一条借阅记录<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lblMessage.Text = "成功借阅该书!";<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lblMessage.Text = "借书失败!";<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else//超出借书量,不能继续借书,给出提示<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lblMessage.Text = "该用户已借满!";<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else//不存在该用户提示<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lblMessage.Text = "不存在该用户!";<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; &nbsp; }<br /> }<br /> </span><br /> <br /> <br />

    5 个回复
    • 回复者:flyer***
      flyer***(用户)回复于:2009-01-02 14:25:00

      :P <br/>设计问题,自己搞定。<br/>开个玩笑。我不会。

    • 回复者:uestc***
      uestc***(用户)回复于:2009-01-01 23:58:00

      提示 &quot;借书失败!&quot; <br/>你应该看一下: if (borrow.InsertByProc())//使用Borrow类InsertByProc方法插入一条借阅记录<br/>这行代码返回的值<br/>提示 &quot;不存在该用户!&quot;<br/>你应该看一下: if (user.LoadData(user.UserID))//查询用户并取出用户权限<br/>能不能成功的取出权限

    • 回复者:佳天下***
      佳天下***(用户)回复于:2009-01-02 00:06:00

      <table style="width: auto;"><tr><td style="border:none;"><div class="quote"><blockquote> 原帖由 <b>uestcwym</b> 于 2009-1-1 23:58:00 发表<br/>提示 &quot;借书失败!&quot; <br/>你应该看一下: if (borrow.InsertByProc())//使用Borrow类InsertByProc方法插入一条借阅记录<br/>这行代码返回的值<br/>提示 &quot;不存在该用户!&quot;<br/>你应该看一下: if (user.LoadDa...... </blockquote></div></td></tr></table><br/><br/>具体该怎么修改啊??我很是迷惑...<br/>再请高手帮忙,谢谢!!

    • 回复者:asp.n***
      asp.n***(用户)回复于:2009-06-02 15:50:00

      调试一下if (borrow.InsertByProc())//这句,看看为什么不执行。估计是插入语句错误。

    • 回复者:何聪***
      何聪***(用户)回复于:2009-06-01 22:28:00

      如果判断的是用户不存在的话,可能是你的权限不够,你的程序中之判断了两个权限,学生和教师,你用来登录的用户名不在权限中,你可能用了后台管理员登陆。如果借书失败的话,你可以还了再借看看,还不行就清空数据库中的借书数量看看。如果还不行的话就看看borrow.InsertByProc()是不是错了