基于.NET的门诊药品查询系统(7)

来源:xiaoniu168.com 作者:本站原创 添加时间:2012-04-06 点击数:21553

计算机毕业设计介绍:

4.2具体页面实现
4.2.1系统登录
登录页面是一个必不可少的部分,但不是每个用户都要进入登录界面,病人对药品的查询不需要登录。门诊医生对药品的查询和每个对系统有操作的用户需要登陆进行身份的验证,以确保进入系统的人员和系统的安全,所以登录界面是系统的第一关卡:ID是验证用户的登陆名,password 和passwordcheck 是对密码的验证,并且根据选择的用户角色进入不同的操作页面,而这个登录框界面友好并且具有国际化的功能:以中文,英文,日文三国语言为操作平台,且操作简单。
具体代码如下:
private void teacher_Button_Click(object sender, System.EventArgs e)
  {
 if( Isbn_TextBox.Text==""|| Book_TextBox.Text==""||Time_TextBox.Text==""|| Author_TextBox.Text==""|| Depart_DropDownList.SelectedIndex==0
 || Type_DropDownList.SelectedIndex==0|| Code_TextBox.Text==""|| Class_TextBox.Text=="")
   {
    showMsg("选项不能为空!!");
    return;
   }
      DBhelper.DBhelper DBh = new DBhelper.DBhelper();

        bool doctor=true;              //默认进入角色
        string input=DropDownList1.SelectedValue;
        switch (input)                      //设置进入角色;
        {
            case "门诊医生":
                doctor = true;
                break;
            case "药房管理":
                doctor = false;
                break;
    }
           string table="Administrator";                //判断进入角色所对应的页面
           if ((DBh.Validat(TextBox1.Text.Trim(), TextBox2.Text.Trim(), table)) &&
 doctor!= false)
         {  
             TextBox3.Text = "成功!请再点击提交进入修改页面";
             this.Button2.PostBackUrl = "docSleWest.aspx";
         }
         else if ((DBh.Validat(TextBox1.Text.Trim(), TextBox2.Text.Trim(), table)) && doctor != true)
           {
               TextBox3.Text = "成功!请再点击提交进入修改页面";
               this.Button2.PostBackUrl = "Add.aspx";
           }
         else {
             TextBox3.Text = "请重新登陆";
          }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第8页为计算机毕业论文部分......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网