Added past refills number incrementation into the refill add form.
This commit is contained in:
parent
464bd14c0a
commit
211a19602f
@ -787,5 +787,33 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
|
||||
}
|
||||
|
||||
public static void PastRefills(string rxNum)
|
||||
{
|
||||
try
|
||||
{
|
||||
myConn.Open();
|
||||
|
||||
cmdString.Parameters.Clear();
|
||||
|
||||
cmdString.Connection = myConn;
|
||||
cmdString.CommandType = CommandType.StoredProcedure;
|
||||
cmdString.CommandTimeout = 1500;
|
||||
|
||||
cmdString.CommandText = "PastRefills";
|
||||
|
||||
cmdString.Parameters.Add("@Prescription_id", SqlDbType.VarChar, 11).Value = rxNum;
|
||||
|
||||
cmdString.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
myConn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -77,6 +77,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
rxNum = txtRxNumber.Text.Trim();
|
||||
|
||||
PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
|
||||
PharmacyDataTier.PastRefills(rxNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user