毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

招聘管理系统设计报告 第4页

更新时间:2010-4-15:  来源:毕业论文
招聘管理系统设计报告 第4页
 this.iRoleId = Convert.ToInt16(this.DropDownList1.SelectedItem.Value);
  }
3、用Session来控制页面的访问权限
当用户试图使用某些功能的时候,系统一般需要验证识别用户身份,只有拥有相关权限的用户才能反问这些功能。验证Web服务的身份的基本技术包括:
1.Forms身份验证
2 .Passport身份验证
3. Windows 身份验证
我们再数据库中添加页面信息表PageInfoTab,来区别不同角色用户对页面的访问权限,每个页面都有自己对应的ID,在页面初始化是,通过Session 总的ID号来检索角色分配表,判断用户是否有权限来访问页面。
在需要控制访问页面中,首先添加对LoginWebSerivce的引用,然后再Page_Load时间中添加如下代码:
   if (login.CheckUser(this.strName,this.strPasswd,this.iRoleId)==1)
   {
    Session["login"]="ok";
    Session["name"]=this.strName;
    Session["roleid"]=this.iRoleId;
    Session["Authority"] = login.GetAuthorityByRole_ID(this.iRoleId);
    Response.Redirect(@"resume\resumelist.aspx");
  }
4、添加角色
添加角色的页面设计如下所示:
 
添加和删除按钮的click事件代码如下:
  private void Button1_Click(object sender, System.EventArgs e)
  {
   int i = 0;
   while (i<=ListBox1.Items.Count -1)
   {
    if(ListBox1.Items[i].Selected)
    {
     ListBox2.Items.Add(ListBox1.Items[i]);
     ListBox1.Items.Remove(ListBox1.Items[i]);
    }
    else
     i+=1;
   }
  }
单击“删除”按钮的时候,检查右边listbox中已经选定的项目,使用remove方法将其从右边的listbox中去掉。
  private void Button2_Click(object sender, System.EventArgs e)
  {
   int i = 0;
   while(i<=ListBox2.Items.Count - 1)
   {
    if (ListBox2.Items[i].Selected)
    {
     ListBox1.Items.Add(ListBox2.Items[i]);
     ListBox2.Items.Remove(ListBox2.Items[i]);
    }
    else
     i+=1;
   }
  }
单击“添加”按钮的时候,检查左边listbox中已经选定的项目,使用add方法将其添加到右边的listbox的item中。
  private void Button5_Click(object sender, System.EventArgs e)
  {
   if(ListBox1.Items.Count>0)
   {
    foreach(ListItem MyItem in ListBox1.Items)
     ListBox2.Items.Add(MyItem);
    ListBox1.Items.Clear();   }
  }
单击“全部删除”按钮的时候,使用clear方法将右边listbox中的item清空。
  private void Button6_Click(object sender, System.EventArgs e)
  {
   if(ListBox2.Items.Count>0)
   {
    foreach(ListItem MyItem in ListBox2.Items)
     ListBox1.Items.Add(MyItem);
    ListBox2.Items.Clear();
   }
  }
我们使用遍历的方法来处理在列表框中同时选定的多个选项。
“提交”按钮的click事件代码如下:
  private void Button3_Click(object sender, System.EventArgs e)
  { 
   int iCheckPass = 1;
   if (this.TextBox1.Text.ToString().Trim()==null||this.TextBox1.Text.ToString().Trim()=="")
   {
    this.Label2.Text = "请输入角色名!";
    iCheckPass = 0;
   }
   if (this.TextBox1.Text.ToString().Trim()!=null&&this.TextBox1.Text.ToString().Trim

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页

招聘管理系统设计报告 第4页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。