Example #1
0
 public void Add(Student student)
 {
     ITransaction transacao = session.BeginTransaction();
     session.Save(student);
     transacao.Commit();
 }
Example #2
0
 public void Update(Student student)
 {
     ITransaction transacao = session.BeginTransaction();
     session.Update(student);
     transacao.Commit();
 }
Example #3
0
 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.");
 }