public ConsultationViewModel( Consultation cs)
 {
     Symptoms = cs.Symptoms;
     Diagnosis = cs.Diagnosis;
     Recommendation = cs.Recommendation;
     AppointmentId = cs.Appontmentid.ToString();
     Date = cs.Appointment.FromTime.ToString();
 }
        public bool Add(Consultation cs)
        {
            db.Consultations.AddObject(cs);
            try
            {
                db.SaveChanges();
            }
            catch (Exception)
            {

                return false;
            }
            return true;
        }
 public void Delete(Consultation cs)
 {
     db.Consultations.DeleteObject(cs);
 }
Esempio n. 4
0
 /// <summary>
 /// Create a new Consultation object.
 /// </summary>
 /// <param name="consultationid">Initial value of the Consultationid property.</param>
 /// <param name="appontmentid">Initial value of the Appontmentid property.</param>
 public static Consultation CreateConsultation(global::System.Int32 consultationid, global::System.Int32 appontmentid)
 {
     Consultation consultation = new Consultation();
     consultation.Consultationid = consultationid;
     consultation.Appontmentid = appontmentid;
     return consultation;
 }
Esempio n. 5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Consultations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToConsultations(Consultation consultation)
 {
     base.AddObject("Consultations", consultation);
 }