added refresh frminfo on refill delete, commented out 97 on frmrefillAdd

This commit is contained in:
EggMan20339 2024-02-23 08:10:06 -05:00
parent 8d24db6807
commit f83804237c
3 changed files with 23 additions and 4 deletions

View File

@ -941,7 +941,7 @@ namespace Louis__Pharmacy_CNSA212_FP
string rxNumString = (row.Cells[0].Value).ToString();
Int32 rxNum = Int32.Parse(rxNumString);
frmRefill refill = new frmRefill(rxNum);
frmRefill refill = new frmRefill(rxNum, this);
refill.MdiParent = MdiParent;
refill.StartPosition = FormStartPosition.CenterScreen;
refill.Show();

View File

@ -19,9 +19,12 @@ namespace Louis__Pharmacy_CNSA212_FP
{
public DataSet ds = new DataSet();
private int rxNum = 0;
public frmRefill(int thisRxID)
private frmInfo SourceForm = new frmInfo();
public frmRefill(int thisRxID, frmInfo SenderForm)
{
SourceForm = SenderForm;
InitializeComponent();
rxNum = thisRxID;
frmRefill_Load(null, null);
@ -44,6 +47,19 @@ namespace Louis__Pharmacy_CNSA212_FP
dgvRefills.DataSource = ds.Tables[0];
}
private void frmRefill_reLoad(object sender, EventArgs e)
{
int rxID = 0;
DataGridViewRow row = new DataGridViewRow();
rxID = rxNum;
DataSet ds = new DataSet();
ds = PharmacyDataTier.GetRefill(rxID.ToString());
dgvRefills.DataSource = ds.Tables[0];
}
private void editToolStripMenuItem_Click(object sender, EventArgs e)
{
@ -80,6 +96,9 @@ namespace Louis__Pharmacy_CNSA212_FP
PharmacyDataTier.DeleteRefill(refillID);
PharmacyDataTier.DecrementPastRefills(rxID);
frmRefill_reLoad(sender, e);
SourceForm.btnPrescriptionSearch_Click(sender,e);
}
public void refreshrefills(object sender, EventArgs e)

View File

@ -94,7 +94,7 @@ namespace Louis__Pharmacy_CNSA212_FP
medicationID = txtMedicationID.Text.Trim();
rxNum = txtRxNumber.Text.Trim();
frmRefill refill = new frmRefill(0);
// frmRefill refill = new frmRefill(0, this);
PharmacyDataTier.UpdateRefill(refillID, date, patientID, medicationID, rxNum);