Merge
This commit is contained in:
parent
03e7185225
commit
ea7474900f
@ -1235,6 +1235,34 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void DecrementPastRefills(string rxNum)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
myConn.Open();
|
||||||
|
|
||||||
|
cmdString.Parameters.Clear();
|
||||||
|
|
||||||
|
cmdString.Connection = myConn;
|
||||||
|
cmdString.CommandType = CommandType.StoredProcedure;
|
||||||
|
cmdString.CommandTimeout = 1500;
|
||||||
|
|
||||||
|
cmdString.CommandText = "DecrementPastRefills";
|
||||||
|
|
||||||
|
cmdString.Parameters.Add("@Prescription_id", SqlDbType.VarChar, 11).Value = rxNum;
|
||||||
|
|
||||||
|
cmdString.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new ArgumentException(ex.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
myConn.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void CreatePrescription(
|
public static void CreatePrescription(
|
||||||
string RxNum,
|
string RxNum,
|
||||||
string Patient_id,
|
string Patient_id,
|
||||||
|
7
Louis'-Pharmacy_CNSA212-FP/frmRefill.Designer.cs
generated
7
Louis'-Pharmacy_CNSA212-FP/frmRefill.Designer.cs
generated
@ -182,20 +182,21 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
this.editToolStripMenuItem,
|
this.editToolStripMenuItem,
|
||||||
this.deleteToolStripMenuItem});
|
this.deleteToolStripMenuItem});
|
||||||
this.cmuRefill.Name = "cmuRefill";
|
this.cmuRefill.Name = "cmuRefill";
|
||||||
this.cmuRefill.Size = new System.Drawing.Size(108, 48);
|
this.cmuRefill.Size = new System.Drawing.Size(181, 70);
|
||||||
//
|
//
|
||||||
// editToolStripMenuItem
|
// editToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
this.editToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.editToolStripMenuItem.Text = "Edit";
|
this.editToolStripMenuItem.Text = "Edit";
|
||||||
this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click);
|
this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// deleteToolStripMenuItem
|
// deleteToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.deleteToolStripMenuItem.Text = "Delete";
|
this.deleteToolStripMenuItem.Text = "Delete";
|
||||||
|
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// frmRefill
|
// frmRefill
|
||||||
//
|
//
|
||||||
|
@ -67,6 +67,21 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
editToolStripMenuItem_Click(sender, e);
|
editToolStripMenuItem_Click(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string refillID = "";
|
||||||
|
string rxID = "";
|
||||||
|
|
||||||
|
DataGridViewRow row = new DataGridViewRow();
|
||||||
|
row = dgvRefills.SelectedRows[0];
|
||||||
|
|
||||||
|
refillID = (row.Cells[0].Value).ToString();
|
||||||
|
rxID = (row.Cells[4].Value).ToString();
|
||||||
|
|
||||||
|
PharmacyDataTier.DeleteRefill(refillID);
|
||||||
|
PharmacyDataTier.DecrementPastRefills(rxID);
|
||||||
|
}
|
||||||
|
|
||||||
//private void btnSearch_Click(object sender, EventArgs e)
|
//private void btnSearch_Click(object sender, EventArgs e)
|
||||||
//{
|
//{
|
||||||
// string patientID = "";
|
// string patientID = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user