public void Add(Student student)
 {
     ITransaction transacao = session.BeginTransaction();
     session.Save(student);
     transacao.Commit();
 }
 public void Update(Student student)
 {
     ITransaction transacao = session.BeginTransaction();
     session.Update(student);
     transacao.Commit();
 }
 private void buttonOk_Click(object sender, EventArgs e)
 {
     double value;
     if (double.TryParse(textBoxValue.Text, out value))
     {
         Sale sale = new Sale(double.Parse(this.textBoxValue.Text), null, null);
         Student student = new Student();
         student.Id = this.studentId;
         sale.Student = student;
         sale.IsReload = true;
         MessageBox.Show(sale.send());
         this.Close();
     }
     else
         MessageBox.Show("Insira um valor válido.");
 }