示例#1
0
 public Visit(Physiotherapist physio, Referral referral, DateTime date, string time, bool visitCompleted = false, bool visitSettled = false)
 {
     this.Physiotherapist = physio;
     this.Referral        = referral;
     this.VisitDate       = date;
     this.VisitTime       = time;
     this.DateSaved       = DateTime.Now;
     this.VisitCompleted  = visitCompleted;
     this.VisitSettled    = visitSettled;
 }
示例#2
0
 public static void DeleteReferral(Referral referral, ApplicationDbContext dbcontext)
 {
     try
     {
         dbcontext.Referrals.Remove(referral);
         dbcontext.SaveChanges();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#3
0
        public static void AddReferral(string diagnosis, string icd10, string treatments, string doctor, int nbofdays, DateTime datereferral, Patient patient, ApplicationDbContext dbcontext)
        {
            Referral r1 = new Referral(diagnosis, icd10, treatments, doctor, nbofdays, datereferral, patient);

            try
            {
                dbcontext.Referrals.Add(r1);
                dbcontext.SaveChanges();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#4
0
        public static void AddVisit(Physiotherapist physio, Referral referral, DateTime date, string time, ApplicationDbContext dbcontext)
        {
            Visit vis = new Visit(physio, referral, date, time);

            try
            {
                dbcontext.Visits.Add(vis);
                dbcontext.SaveChanges();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }