From 02ad8d2c267d6fa9eb8292a0990ca5e32ed63449 Mon Sep 17 00:00:00 2001 From: Adam McCane Date: Wed, 14 Feb 2024 15:35:00 -0500 Subject: [PATCH 1/2] Added context menu to the refill form. --- .../frmRefill.Designer.cs | 38 +++++++++++++++++++ Louis'-Pharmacy_CNSA212-FP/frmRefill.resx | 3 ++ 2 files changed, 41 insertions(+) diff --git a/Louis'-Pharmacy_CNSA212-FP/frmRefill.Designer.cs b/Louis'-Pharmacy_CNSA212-FP/frmRefill.Designer.cs index 24b9a40..4a3608a 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmRefill.Designer.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmRefill.Designer.cs @@ -29,6 +29,7 @@ namespace Louis__Pharmacy_CNSA212_FP /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmRefill)); this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); @@ -49,7 +50,12 @@ namespace Louis__Pharmacy_CNSA212_FP this.patientid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.medicationid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.rxnumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.cmuAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.cmuUpdate = new System.Windows.Forms.ToolStripMenuItem(); + this.cmuDelete = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // // bindingNavigatorAddNewItem @@ -160,6 +166,33 @@ namespace Louis__Pharmacy_CNSA212_FP this.rxnumber.HeaderText = "Rx Number"; this.rxnumber.Name = "rxnumber"; // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.cmuAdd, + this.cmuUpdate, + this.cmuDelete}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(181, 92); + // + // cmuAdd + // + this.cmuAdd.Name = "cmuAdd"; + this.cmuAdd.Size = new System.Drawing.Size(180, 22); + this.cmuAdd.Text = "Add"; + // + // cmuUpdate + // + this.cmuUpdate.Name = "cmuUpdate"; + this.cmuUpdate.Size = new System.Drawing.Size(180, 22); + this.cmuUpdate.Text = "Update"; + // + // cmuDelete + // + this.cmuDelete.Name = "cmuDelete"; + this.cmuDelete.Size = new System.Drawing.Size(180, 22); + this.cmuDelete.Text = "Delete"; + // // frmRefill // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -172,6 +205,7 @@ namespace Louis__Pharmacy_CNSA212_FP this.Text = "Louis\' Pharmacy - Prescription Refill"; this.Load += new System.EventHandler(this.frmRefill_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); this.ResumeLayout(false); } @@ -210,5 +244,9 @@ namespace Louis__Pharmacy_CNSA212_FP private System.Windows.Forms.DataGridViewTextBoxColumn patientid; private System.Windows.Forms.DataGridViewTextBoxColumn medicationid; private System.Windows.Forms.DataGridViewTextBoxColumn rxnumber; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem cmuAdd; + private System.Windows.Forms.ToolStripMenuItem cmuUpdate; + private System.Windows.Forms.ToolStripMenuItem cmuDelete; } } \ No newline at end of file diff --git a/Louis'-Pharmacy_CNSA212-FP/frmRefill.resx b/Louis'-Pharmacy_CNSA212-FP/frmRefill.resx index a0d70f5..e194b91 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmRefill.resx +++ b/Louis'-Pharmacy_CNSA212-FP/frmRefill.resx @@ -132,6 +132,9 @@ True + + 17, 17 + From ab73eed578b6c01365fa5d78030dc01e396bf06d Mon Sep 17 00:00:00 2001 From: Adam McCane Date: Wed, 14 Feb 2024 20:05:13 -0500 Subject: [PATCH 2/2] Made refill data tier. --- .../Louis'-Pharmacy_CNSA212-FP.csproj | 1 + Louis'-Pharmacy_CNSA212-FP/frmInfo.cs | 5 +++++ Louis'-Pharmacy_CNSA212-FP/frmRefill.cs | 9 ++++++--- Louis'-Pharmacy_CNSA212-FP/refillDataTier.cs | 13 +++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 Louis'-Pharmacy_CNSA212-FP/refillDataTier.cs diff --git a/Louis'-Pharmacy_CNSA212-FP/Louis'-Pharmacy_CNSA212-FP.csproj b/Louis'-Pharmacy_CNSA212-FP/Louis'-Pharmacy_CNSA212-FP.csproj index b4c7b19..4d4ce36 100644 --- a/Louis'-Pharmacy_CNSA212-FP/Louis'-Pharmacy_CNSA212-FP.csproj +++ b/Louis'-Pharmacy_CNSA212-FP/Louis'-Pharmacy_CNSA212-FP.csproj @@ -90,6 +90,7 @@ + frmAbout.cs diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs index a306288..5b38cca 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs @@ -8,6 +8,11 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Microsoft.VisualBasic; +using System.Configuration; +using System.Collections; +using System.Data.SqlClient; + namespace Louis__Pharmacy_CNSA212_FP { public partial class frmInfo : Form diff --git a/Louis'-Pharmacy_CNSA212-FP/frmRefill.cs b/Louis'-Pharmacy_CNSA212-FP/frmRefill.cs index 00092f9..16a900c 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmRefill.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmRefill.cs @@ -8,6 +8,11 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Microsoft.VisualBasic; +using System.Configuration; +using System.Collections; +using System.Data.SqlClient; + namespace Louis__Pharmacy_CNSA212_FP { public partial class frmRefill : Form @@ -24,9 +29,7 @@ namespace Louis__Pharmacy_CNSA212_FP private void frmRefill_Load(object sender, EventArgs e) { - // TODO: This line of code loads data into the 'finalProjectOfficialPharmacyDataSet.REFILLS' table. You can move, or remove it, as needed. - //this.rEFILLSTableAdapter.Fill(this.finalProjectOfficialPharmacyDataSet.REFILLS); - + } } } diff --git a/Louis'-Pharmacy_CNSA212-FP/refillDataTier.cs b/Louis'-Pharmacy_CNSA212-FP/refillDataTier.cs new file mode 100644 index 0000000..5cd061c --- /dev/null +++ b/Louis'-Pharmacy_CNSA212-FP/refillDataTier.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Louis__Pharmacy_CNSA212_FP +{ + class refillDataTier + { + + } +}