Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c8e7230cca
63
Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs
generated
63
Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs
generated
@ -285,7 +285,22 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
this.dgvPatient.AllowUserToAddRows = false;
|
this.dgvPatient.AllowUserToAddRows = false;
|
||||||
this.dgvPatient.AllowUserToDeleteRows = false;
|
this.dgvPatient.AllowUserToDeleteRows = false;
|
||||||
this.dgvPatient.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.dgvPatient.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dgvPatient.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.pat_id, this.FirstName, this.LastName, this.MiddleInitials, this.City, this.UsState, this.Zip, this.Ibs, this.Height_feet, this.Height_inches, this.Ailment, this.DOB, this.PhoneNumber, this.Gender, this.Medications });
|
this.dgvPatient.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
|
this.pat_id,
|
||||||
|
this.FirstName,
|
||||||
|
this.LastName,
|
||||||
|
this.MiddleInitials,
|
||||||
|
this.City,
|
||||||
|
this.UsState,
|
||||||
|
this.Zip,
|
||||||
|
this.Ibs,
|
||||||
|
this.Height_feet,
|
||||||
|
this.Height_inches,
|
||||||
|
this.Ailment,
|
||||||
|
this.DOB,
|
||||||
|
this.PhoneNumber,
|
||||||
|
this.Gender,
|
||||||
|
this.Medications});
|
||||||
this.dgvPatient.ContextMenuStrip = this.cmuPatient;
|
this.dgvPatient.ContextMenuStrip = this.cmuPatient;
|
||||||
this.dgvPatient.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
|
this.dgvPatient.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
|
||||||
this.dgvPatient.Location = new System.Drawing.Point(0, 0);
|
this.dgvPatient.Location = new System.Drawing.Point(0, 0);
|
||||||
@ -439,7 +454,10 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
// cmuPatient
|
// cmuPatient
|
||||||
//
|
//
|
||||||
this.cmuPatient.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.cmuPatient.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.cmuPatient.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuPatientNew, this.cmuPatientEdit, this.cmuPatientDelete });
|
this.cmuPatient.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.cmuPatientNew,
|
||||||
|
this.cmuPatientEdit,
|
||||||
|
this.cmuPatientDelete});
|
||||||
this.cmuPatient.Name = "contextMenuStrip1";
|
this.cmuPatient.Name = "contextMenuStrip1";
|
||||||
this.cmuPatient.Size = new System.Drawing.Size(108, 70);
|
this.cmuPatient.Size = new System.Drawing.Size(108, 70);
|
||||||
//
|
//
|
||||||
@ -544,7 +562,14 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
this.dgvPrescription.AllowUserToAddRows = false;
|
this.dgvPrescription.AllowUserToAddRows = false;
|
||||||
this.dgvPrescription.AllowUserToDeleteRows = false;
|
this.dgvPrescription.AllowUserToDeleteRows = false;
|
||||||
this.dgvPrescription.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.dgvPrescription.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dgvPrescription.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Medication_id, this.MedicationName, this.IntakeMethod, this.Frequency, this.Dosage, this.Purpose, this.RxNum });
|
this.dgvPrescription.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
|
this.Medication_id,
|
||||||
|
this.MedicationName,
|
||||||
|
this.IntakeMethod,
|
||||||
|
this.Frequency,
|
||||||
|
this.Dosage,
|
||||||
|
this.Purpose,
|
||||||
|
this.RxNum});
|
||||||
this.dgvPrescription.ContextMenuStrip = this.cmuMedication;
|
this.dgvPrescription.ContextMenuStrip = this.cmuMedication;
|
||||||
this.dgvPrescription.Location = new System.Drawing.Point(3, 3);
|
this.dgvPrescription.Location = new System.Drawing.Point(3, 3);
|
||||||
this.dgvPrescription.Name = "dgvPrescription";
|
this.dgvPrescription.Name = "dgvPrescription";
|
||||||
@ -620,7 +645,10 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
// cmuMedication
|
// cmuMedication
|
||||||
//
|
//
|
||||||
this.cmuMedication.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.cmuMedication.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.cmuMedication.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuMedicationNew, this.cmuMedicationEdit, this.cmuMedicationDelete });
|
this.cmuMedication.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.cmuMedicationNew,
|
||||||
|
this.cmuMedicationEdit,
|
||||||
|
this.cmuMedicationDelete});
|
||||||
this.cmuMedication.Name = "cmuMedication";
|
this.cmuMedication.Name = "cmuMedication";
|
||||||
this.cmuMedication.Size = new System.Drawing.Size(108, 70);
|
this.cmuMedication.Size = new System.Drawing.Size(108, 70);
|
||||||
//
|
//
|
||||||
@ -729,7 +757,18 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
this.dgvPhysician.AllowUserToAddRows = false;
|
this.dgvPhysician.AllowUserToAddRows = false;
|
||||||
this.dgvPhysician.AllowUserToDeleteRows = false;
|
this.dgvPhysician.AllowUserToDeleteRows = false;
|
||||||
this.dgvPhysician.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.dgvPhysician.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dgvPhysician.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Phys_id, this.namefirst, this.namelast, this.initialsmiddle, this.cit, this.state, this.zipp, this.dobb, this.numberphone, this.gennder, this.Specialty });
|
this.dgvPhysician.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
|
this.Phys_id,
|
||||||
|
this.namefirst,
|
||||||
|
this.namelast,
|
||||||
|
this.initialsmiddle,
|
||||||
|
this.cit,
|
||||||
|
this.state,
|
||||||
|
this.zipp,
|
||||||
|
this.dobb,
|
||||||
|
this.numberphone,
|
||||||
|
this.gennder,
|
||||||
|
this.Specialty});
|
||||||
this.dgvPhysician.ContextMenuStrip = this.cmuPhysician;
|
this.dgvPhysician.ContextMenuStrip = this.cmuPhysician;
|
||||||
this.dgvPhysician.Location = new System.Drawing.Point(0, 3);
|
this.dgvPhysician.Location = new System.Drawing.Point(0, 3);
|
||||||
this.dgvPhysician.Name = "dgvPhysician";
|
this.dgvPhysician.Name = "dgvPhysician";
|
||||||
@ -845,7 +884,10 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
// cmuPhysician
|
// cmuPhysician
|
||||||
//
|
//
|
||||||
this.cmuPhysician.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.cmuPhysician.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.cmuPhysician.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuPhysicianNew, this.cmuPhysicianEdit, this.cmuPhysicianDelete });
|
this.cmuPhysician.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.cmuPhysicianNew,
|
||||||
|
this.cmuPhysicianEdit,
|
||||||
|
this.cmuPhysicianDelete});
|
||||||
this.cmuPhysician.Name = "cmuPhysician";
|
this.cmuPhysician.Name = "cmuPhysician";
|
||||||
this.cmuPhysician.Size = new System.Drawing.Size(108, 70);
|
this.cmuPhysician.Size = new System.Drawing.Size(108, 70);
|
||||||
//
|
//
|
||||||
@ -980,7 +1022,12 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
// cmuPrescription
|
// cmuPrescription
|
||||||
//
|
//
|
||||||
this.cmuPrescription.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.cmuPrescription.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.cmuPrescription.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuPrescriptionNew, this.cmuPrescriptionEdit, this.cmuPrescriptionDelete, this.cmuPrescriptionRefillThis, this.cmuPrescriptionViewRefills });
|
this.cmuPrescription.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.cmuPrescriptionNew,
|
||||||
|
this.cmuPrescriptionEdit,
|
||||||
|
this.cmuPrescriptionDelete,
|
||||||
|
this.cmuPrescriptionRefillThis,
|
||||||
|
this.cmuPrescriptionViewRefills});
|
||||||
this.cmuPrescription.Name = "cmuPrescription";
|
this.cmuPrescription.Name = "cmuPrescription";
|
||||||
this.cmuPrescription.Size = new System.Drawing.Size(244, 136);
|
this.cmuPrescription.Size = new System.Drawing.Size(244, 136);
|
||||||
//
|
//
|
||||||
@ -1010,6 +1057,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
this.cmuPrescriptionRefillThis.Name = "cmuPrescriptionRefillThis";
|
this.cmuPrescriptionRefillThis.Name = "cmuPrescriptionRefillThis";
|
||||||
this.cmuPrescriptionRefillThis.Size = new System.Drawing.Size(243, 22);
|
this.cmuPrescriptionRefillThis.Size = new System.Drawing.Size(243, 22);
|
||||||
this.cmuPrescriptionRefillThis.Text = "Refill This Prescription";
|
this.cmuPrescriptionRefillThis.Text = "Refill This Prescription";
|
||||||
|
this.cmuPrescriptionRefillThis.Click += new System.EventHandler(this.cmuPrescriptionRefillThis_Click);
|
||||||
//
|
//
|
||||||
// cmuPrescriptionViewRefills
|
// cmuPrescriptionViewRefills
|
||||||
//
|
//
|
||||||
@ -1058,6 +1106,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
((System.ComponentModel.ISupportInitialize)(this.dgvRx)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.dgvRx)).EndInit();
|
||||||
this.cmuPrescription.ResumeLayout(false);
|
this.cmuPrescription.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem cmuPrescriptionViewRefills;
|
private System.Windows.Forms.ToolStripMenuItem cmuPrescriptionViewRefills;
|
||||||
|
@ -755,10 +755,48 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cmuAddRefill_Click(object sender, EventArgs e)
|
private void cmuPrescriptionRefillThis_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string refillID = "";
|
||||||
|
DateTime date = new DateTime();
|
||||||
|
string patientID = "";
|
||||||
|
string medicationID = "";
|
||||||
|
string rxNum = "";
|
||||||
|
Int32 numRefills = 0;
|
||||||
|
Int32 pastNumRefills = 0;
|
||||||
|
|
||||||
|
rxNum = ds.Tables[0].Rows[0]["RxNum_id"].ToString();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DataSet ds = new DataSet();
|
||||||
|
PharmacyDataTier phaDT = new PharmacyDataTier();
|
||||||
|
|
||||||
|
ds = phaDT.NumberofRefills(rxNum);
|
||||||
|
|
||||||
|
numRefills = Int32.Parse(ds.Tables[0].Rows[0]["numRefills"].ToString());
|
||||||
|
pastNumRefills = Int32.Parse(ds.Tables[0].Rows[0]["pastNumRefills"].ToString());
|
||||||
|
|
||||||
|
if (numRefills == pastNumRefills)
|
||||||
|
{
|
||||||
|
MessageBox.Show("This prescription has reached the maximum number of refills.", "Max Refill", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
refillID = PharmacyDataTier.GetNextRefillID().ToString();
|
||||||
|
date = DateTime.Now;
|
||||||
|
patientID = ds.Tables[0].Rows[0]["Patient_id"].ToString() ;
|
||||||
|
medicationID = ds.Tables[0].Rows[0]["Medication_id"].ToString();
|
||||||
|
|
||||||
|
PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
|
||||||
|
PharmacyDataTier.PastRefills(rxNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void dgvRx_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
private void dgvRx_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
@ -767,3 +805,4 @@ namespace Louis__Pharmacy_CNSA212_FP
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user