Exemplo n.º 1
0
 public void Delete()
 {
     if (!IsClosed)
     {
         AppointmentData data = new AppointmentData();
         data.Remove(AppointmentId);
     }
     else
     {
         throw new Exception("Appointment closed, cannot delete");
     }
 }
Exemplo n.º 2
0
        public void Save()
        {
            AppointmentData data = new AppointmentData();

            if (this.AppointmentId == 0)
            {
                data.Add(this);
            }
            else
            {
                data.Update(this);
            }
        }