private void button1_Click(object sender, EventArgs e)
 {
     Accessor accessor = Accessor.Instance;
     Users user = new Users
     {
         name = this.textBox1.Text,
         role = comboBox1.Text,
         password = Convert.ToInt32(textBox3.Text),
         email = textBox4.Text
     };
     accessor.CreateUser(user);
     this.Close();
 }
 //保存用户信息
 public void CreateUser(Users user)
 {
     session.Save(user);
     session.Flush();
 }
 //删除用户信息
 public void DeleteUsers(Users user)
 {
     session.Delete(user);
     session.Flush();
 }
 //更新用户信息
 public void UpdateUsers(Users user)
 {
     session.Update(user);
     session.Flush();
 }