Ejemplo n.º 1
0
 public bool createAppointment(AppointmentDetail a)
 {
     using (AppointmentSchedulerEntities3 conf = new AppointmentSchedulerEntities3())
     {
         a.AppointmentID = Guid.NewGuid().ToString();
         conf.AppointmentDetails.Add(a);
         conf.SaveChanges();
     }
     return(true);
 }
Ejemplo n.º 2
0
    public bool addPatient(PatientViewModel d)
    {
        using (AppointmentSchedulerEntities3 conf = new AppointmentSchedulerEntities3())
        {
            PatientDetail p = new PatientDetail();
            p.PatientID = Guid.NewGuid().ToString();

            p.PatientName      = d.PatientName;
            p.HealthConditions = d.HealthConditions;
            p.Age    = d.Age;
            p.Gender = d.Gender.ToString();
            conf.PatientDetails.Add(p);
            conf.SaveChanges();
            return(true);
        }
    }
Ejemplo n.º 3
0
 public bool addDoctor(DoctorViewModel d)
 {
     using (AppointmentSchedulerEntities3 conf = new AppointmentSchedulerEntities3())
     {
         DoctorDetail e = new DoctorDetail();
         e.DoctorID   = Guid.NewGuid().ToString();
         e.DoctorName = d.DoctorName;
         e.Specaility = d.Specaility.ToString();
         if (d.isAvailable == true)
         {
             e.IsAvailable = "yes";
         }
         else
         {
             e.IsAvailable = "no";
         }
         conf.DoctorDetails.Add(e);
         conf.SaveChanges();
         return(true);
     }
 }