diff --git a/Chapter6.zip b/Chapter6.zip deleted file mode 100644 index 4288bb2..0000000 Binary files a/Chapter6.zip and /dev/null differ diff --git a/Database3.zip b/Database3.zip new file mode 100644 index 0000000..aa24113 Binary files /dev/null and b/Database3.zip differ diff --git a/Database3/Program.cs b/Database3/Program.cs index 4f4b992..c078372 100644 --- a/Database3/Program.cs +++ b/Database3/Program.cs @@ -16,7 +16,7 @@ namespace Database3 { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new frmEdit()); + Application.Run(new frmSearch()); } } } \ No newline at end of file diff --git a/Database3/frmSearch.Designer.cs b/Database3/frmSearch.Designer.cs index 5e1d7cc..fde9994 100644 --- a/Database3/frmSearch.Designer.cs +++ b/Database3/frmSearch.Designer.cs @@ -29,6 +29,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.lblDisStID = new System.Windows.Forms.Label(); this.dgvStudents = new System.Windows.Forms.DataGridView(); this.lblDislname = new System.Windows.Forms.Label(); @@ -37,7 +38,13 @@ this.txtlname = new System.Windows.Forms.TextBox(); this.txtDOB = new System.Windows.Forms.TextBox(); this.btnSearch = new System.Windows.Forms.Button(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.cmuSearch = new System.Windows.Forms.ToolStripMenuItem(); + this.cmuEdit = new System.Windows.Forms.ToolStripMenuItem(); + this.cmuDelete = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.dgvStudents)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // // lblDisStID @@ -106,12 +113,42 @@ this.btnSearch.UseVisualStyleBackColor = true; this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripSeparator1, this.cmuSearch, this.cmuEdit, this.cmuDelete }); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(110, 76); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(106, 6); + // + // cmuSearch + // + this.cmuSearch.Name = "cmuSearch"; + this.cmuSearch.Size = new System.Drawing.Size(109, 22); + this.cmuSearch.Text = "Search"; + // + // cmuEdit + // + this.cmuEdit.Name = "cmuEdit"; + this.cmuEdit.Size = new System.Drawing.Size(109, 22); + this.cmuEdit.Text = "Edit"; + // + // cmuDelete + // + this.cmuDelete.Name = "cmuDelete"; + this.cmuDelete.Size = new System.Drawing.Size(109, 22); + this.cmuDelete.Text = "Delete"; + // // frmSearch // this.AcceptButton = this.btnSearch; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(800, 450); + this.ContextMenuStrip = this.contextMenuStrip1; this.Controls.Add(this.btnSearch); this.Controls.Add(this.txtDOB); this.Controls.Add(this.txtlname); @@ -122,11 +159,20 @@ this.Controls.Add(this.lblDisStID); this.Name = "frmSearch"; this.Text = "Form1"; + this.Load += new System.EventHandler(this.frmSearch_Load); ((System.ComponentModel.ISupportInitialize)(this.dgvStudents)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); } + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem cmuSearch; + private System.Windows.Forms.ToolStripMenuItem cmuEdit; + private System.Windows.Forms.ToolStripMenuItem cmuDelete; + + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.Label lblDislname; private System.Windows.Forms.Label lblDisDOB; private System.Windows.Forms.TextBox txtStuID; diff --git a/Database3/frmSearch.cs b/Database3/frmSearch.cs index ec7de52..57567a9 100644 --- a/Database3/frmSearch.cs +++ b/Database3/frmSearch.cs @@ -73,6 +73,11 @@ namespace Database3 MessageBox.Show($"An error occurred: {ex.Message}"); } } + + private void frmSearch_Load(object sender, EventArgs e) + { + } + } } diff --git a/Database3/frmSearch.resx b/Database3/frmSearch.resx index 1af7de1..ad53752 100644 --- a/Database3/frmSearch.resx +++ b/Database3/frmSearch.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file