コード例 #1
0
ファイル: Visit.cs プロジェクト: 6IIZgrupaGPL02/InzOprProjekt
 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
ファイル: Visit.cs プロジェクト: 6IIZgrupaGPL02/InzOprProjekt
        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);
            }
        }