Beispiel #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the doctor EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTodoctor(doctor doctor)
 {
     base.AddObject("doctor", doctor);
 }
Beispiel #2
0
Datei: DB.cs Projekt: cpbuck12/Db
 public doctor[] GetDoctors(bool recentOnly,int patient)
 {
     conciergeEntities conciergeEntities;
     using (conciergeEntities = new conciergeEntities())
     {
         IQueryable<doctor> query;
         if (recentOnly)
         {
             query = from doct in conciergeEntities.doctor
                     join dr_pat in conciergeEntities.doctor_patient on doct.id equals dr_pat.doctor_id
                     where dr_pat.recent == true && dr_pat.released == true && dr_pat.patient_id == patient
                     select doct;
         }
         else
         {
             query = from doct in conciergeEntities.doctor
                     join dr_pat in conciergeEntities.doctor_patient on doct.id equals dr_pat.doctor_id
                     where dr_pat.released == true && dr_pat.patient_id == patient
                     select doct;
         }
         if (query.Count() == 0)
             return null;
         doctor[] doctors = new doctor[query.Count()];
         int iDoctor = 0;
         foreach (doctor d in query)
         {
             doctors[iDoctor] = d;
             iDoctor++;
         }
         return doctors;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Create a new doctor object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="firstname">Initial value of the firstname property.</param>
 /// <param name="lastname">Initial value of the lastname property.</param>
 /// <param name="address1">Initial value of the address1 property.</param>
 /// <param name="address2">Initial value of the address2 property.</param>
 /// <param name="address3">Initial value of the address3 property.</param>
 /// <param name="city">Initial value of the city property.</param>
 /// <param name="locality1">Initial value of the locality1 property.</param>
 /// <param name="locality2">Initial value of the locality2 property.</param>
 /// <param name="postal_code">Initial value of the postal_code property.</param>
 /// <param name="country">Initial value of the country property.</param>
 /// <param name="telephone">Initial value of the telephone property.</param>
 /// <param name="fax">Initial value of the fax property.</param>
 /// <param name="email">Initial value of the email property.</param>
 /// <param name="contact_person">Initial value of the contact_person property.</param>
 /// <param name="dob">Initial value of the dob property.</param>
 public static doctor Createdoctor(global::System.Int32 id, global::System.String firstname, global::System.String lastname, global::System.String address1, global::System.String address2, global::System.String address3, global::System.String city, global::System.String locality1, global::System.String locality2, global::System.String postal_code, global::System.String country, global::System.String telephone, global::System.String fax, global::System.String email, global::System.String contact_person, global::System.DateTime dob)
 {
     doctor doctor = new doctor();
     doctor.id = id;
     doctor.firstname = firstname;
     doctor.lastname = lastname;
     doctor.address1 = address1;
     doctor.address2 = address2;
     doctor.address3 = address3;
     doctor.city = city;
     doctor.locality1 = locality1;
     doctor.locality2 = locality2;
     doctor.postal_code = postal_code;
     doctor.country = country;
     doctor.telephone = telephone;
     doctor.fax = fax;
     doctor.email = email;
     doctor.contact_person = contact_person;
     doctor.dob = dob;
     return doctor;
 }