From 8f4c42556cd2c9a1e0fa7c78c3c74eaea955ad0a Mon Sep 17 00:00:00 2001 From: EggMan20339 <99349302+EggMan20339@users.noreply.github.com> Date: Wed, 21 Feb 2024 00:32:19 -0500 Subject: [PATCH] fixed swapped refills edit --- .idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml | 6 ++++++ Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml diff --git a/.idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml b/.idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml new file mode 100644 index 0000000..d6fa49f --- /dev/null +++ b/.idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs b/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs index 8cc429e..b596024 100644 --- a/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs +++ b/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs @@ -1257,8 +1257,8 @@ namespace Louis__Pharmacy_CNSA212_FP cmdString.CommandText = "CreatePrescription"; cmdString.Parameters.Add("@Medication_id", SqlDbType.VarChar, 7).Value = Medication_id; - cmdString.Parameters.Add("@numRefills", SqlDbType.Int).Value = Completed_refills; - cmdString.Parameters.Add("@pastNumRefills", SqlDbType.Int).Value = Max_refills; + cmdString.Parameters.Add("@numRefills", SqlDbType.Int).Value = Max_refills; + cmdString.Parameters.Add("@pastNumRefills", SqlDbType.Int).Value = Completed_refills; cmdString.Parameters.Add("@PrescribedBy", SqlDbType.VarChar, 30).Value = Physician_name; cmdString.Parameters.Add("@Physician_id", SqlDbType.VarChar, 8).Value = Physician_id; cmdString.Parameters.Add("@Patient_id", SqlDbType.VarChar, 8).Value = Patient_id; @@ -1299,8 +1299,8 @@ namespace Louis__Pharmacy_CNSA212_FP cmdString.CommandText = "UpdatePrescription"; cmdString.Parameters.Add("@Medication_id", SqlDbType.VarChar, 7).Value = Medication_id; - cmdString.Parameters.Add("@numRefills", SqlDbType.VarChar, 60).Value = Completed_refills; - cmdString.Parameters.Add("@pastNumRefills", SqlDbType.VarChar, 30).Value = Max_refills; + cmdString.Parameters.Add("@numRefills", SqlDbType.VarChar, 60).Value = Max_refills; + cmdString.Parameters.Add("@pastNumRefills", SqlDbType.VarChar, 30).Value = Completed_refills; cmdString.Parameters.Add("@PrescribedBy", SqlDbType.VarChar, 30).Value = Physician_name; cmdString.Parameters.Add("@Physician_id", SqlDbType.VarChar, 30).Value = Physician_id; cmdString.Parameters.Add("@Patient_id", SqlDbType.VarChar, 100).Value = Patient_id;