From ba556e7339be7b4b7860d75ea977530228366078 Mon Sep 17 00:00:00 2001 From: Garritt McCune Date: Sat, 10 Apr 2021 20:22:54 -0500 Subject: [PATCH] Created a form to manage categories and sub-categories along with their properties. --- .gitignore | 2 + .../DesignTimeBuild/.dtbcache.v2 | Bin 0 -> 260 bytes .vs/InventoryTest/v16/.suo | Bin 0 -> 36352 bytes InventoryTest.sln | 25 + InventoryTest/CategoryManager.Designer.cs | 475 ++++++++++++++++++ InventoryTest/CategoryManager.cs | 269 ++++++++++ InventoryTest/CategoryManager.resx | 60 +++ InventoryTest/Form1.Designer.cs | 374 ++++++++++++++ InventoryTest/Form1.cs | 31 ++ InventoryTest/Form1.resx | 137 +++++ InventoryTest/InventoryTest.csproj | 13 + InventoryTest/InventoryTest.csproj.user | 11 + InventoryTest/Program.cs | 23 + 13 files changed, 1420 insertions(+) create mode 100644 .gitignore create mode 100644 .vs/InventoryTest/DesignTimeBuild/.dtbcache.v2 create mode 100644 .vs/InventoryTest/v16/.suo create mode 100644 InventoryTest.sln create mode 100644 InventoryTest/CategoryManager.Designer.cs create mode 100644 InventoryTest/CategoryManager.cs create mode 100644 InventoryTest/CategoryManager.resx create mode 100644 InventoryTest/Form1.Designer.cs create mode 100644 InventoryTest/Form1.cs create mode 100644 InventoryTest/Form1.resx create mode 100644 InventoryTest/InventoryTest.csproj create mode 100644 InventoryTest/InventoryTest.csproj.user create mode 100644 InventoryTest/Program.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..149ff35 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +InventoryTest/obj +InventoryTest/bin \ No newline at end of file diff --git a/.vs/InventoryTest/DesignTimeBuild/.dtbcache.v2 b/.vs/InventoryTest/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000000000000000000000000000000000000..1aaf4e1146723c9495010e57a81d6c279e66a138 GIT binary patch literal 260 zcmZQ$U|?Y2b4g7qO|Nmxt5k3f2(4j|bt=uwNpVh0&Pa96&nrpH%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#0tYf8e{jK&_6^_8;l3 zZ``dkLTyp%wEsZ+kcUP4Z$Mj7D2-Y2CxDLAza=XFAZnPt-#9^H(6F3ZV1;5qIpR2(Dh_tnldY?t8hxUk@)-s#(&$=ny9(?`rRc z%i=fp+yI3JXpuKE28l5+fX~!|9#DrG5vV+}`gAM|F2f;PW0`RDa<+;Aoy>)`Z;aYm zLFHjiu2In_in=?Hek0Z;ECW!k(WZ33H?|#2y(oqEO9xBbGBCId-SHLpFuEi015&7& z4mMq=4jte^8`mf>^jv2~2Go1i#d!wJB%mBW_ uGmmU{1cC1?O+~up98(0-PEbE{8rgPY*$fAr_r`z6I_MNP&~!RvX%GO^Pt)`O literal 0 HcmV?d00001 diff --git a/InventoryTest.sln b/InventoryTest.sln new file mode 100644 index 0000000..072489c --- /dev/null +++ b/InventoryTest.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31105.61 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InventoryTest", "InventoryTest\InventoryTest.csproj", "{7FE675C0-8B37-40E6-B92E-BCB3509B76C3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7FE675C0-8B37-40E6-B92E-BCB3509B76C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FE675C0-8B37-40E6-B92E-BCB3509B76C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FE675C0-8B37-40E6-B92E-BCB3509B76C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FE675C0-8B37-40E6-B92E-BCB3509B76C3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CFC7AB1F-DCCC-4259-A9E0-908089DBC008} + EndGlobalSection +EndGlobal diff --git a/InventoryTest/CategoryManager.Designer.cs b/InventoryTest/CategoryManager.Designer.cs new file mode 100644 index 0000000..f73cd7c --- /dev/null +++ b/InventoryTest/CategoryManager.Designer.cs @@ -0,0 +1,475 @@ + +namespace InventoryTest +{ + partial class CategoryManager + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.MainLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.SubCategoryComboBox = new System.Windows.Forms.ComboBox(); + this.CategoryComboBox = new System.Windows.Forms.ComboBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.CreateNewSubCategoryButton = new System.Windows.Forms.Button(); + this.CreateNewCategoryButton = new System.Windows.Forms.Button(); + this.NewCategoryNameTextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.CreateSubCategoryButton = new System.Windows.Forms.Button(); + this.SubCategoryPropertyNameTextBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.SubCategoryPropertiesListBox = new System.Windows.Forms.ListBox(); + this.menuStrip2 = new System.Windows.Forms.MenuStrip(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.DeleteSubCategoryButton = new System.Windows.Forms.Button(); + this.DeleteCategoryButton = new System.Windows.Forms.Button(); + this.SubCategoryComboBoxManager = new System.Windows.Forms.ComboBox(); + this.CategoryComboBoxManager = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.CategoryPropertiesListBox = new System.Windows.Forms.ListBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.CategoryPropertyNameTextBox = new System.Windows.Forms.TextBox(); + this.CreateCategoryPropertyButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); + this.MainLayoutPanel.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.SuspendLayout(); + // + // MainLayoutPanel + // + this.MainLayoutPanel.ColumnCount = 3; + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34F)); + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.MainLayoutPanel.Controls.Add(this.menuStrip1, 0, 0); + this.MainLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.MainLayoutPanel.Name = "MainLayoutPanel"; + this.MainLayoutPanel.RowCount = 1; + this.MainLayoutPanel.Size = new System.Drawing.Size(200, 100); + this.MainLayoutPanel.TabIndex = 0; + // + // menuStrip1 + // + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(66, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.SubCategoryComboBox); + this.groupBox1.Controls.Add(this.CategoryComboBox); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(267, 28); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(266, 134); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Category Selection"; + // + // SubCategoryComboBox + // + this.SubCategoryComboBox.Location = new System.Drawing.Point(0, 0); + this.SubCategoryComboBox.Name = "SubCategoryComboBox"; + this.SubCategoryComboBox.Size = new System.Drawing.Size(121, 23); + this.SubCategoryComboBox.TabIndex = 0; + // + // CategoryComboBox + // + this.CategoryComboBox.Location = new System.Drawing.Point(0, 0); + this.CategoryComboBox.Name = "CategoryComboBox"; + this.CategoryComboBox.Size = new System.Drawing.Size(121, 23); + this.CategoryComboBox.TabIndex = 1; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 3; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanel1.Controls.Add(this.groupBox7, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.groupBox6, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.groupBox4, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.menuStrip2, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.groupBox2, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.groupBox3, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.groupBox5, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.groupBox8, 0, 3); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 34F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 450); + this.tableLayoutPanel1.TabIndex = 1; + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.CreateNewSubCategoryButton); + this.groupBox7.Controls.Add(this.CreateNewCategoryButton); + this.groupBox7.Controls.Add(this.NewCategoryNameTextBox); + this.groupBox7.Controls.Add(this.label5); + this.groupBox7.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox7.Location = new System.Drawing.Point(3, 168); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(258, 138); + this.groupBox7.TabIndex = 6; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "Category / Sub-Category Management"; + // + // CreateNewSubCategoryButton + // + this.CreateNewSubCategoryButton.Enabled = false; + this.CreateNewSubCategoryButton.Location = new System.Drawing.Point(121, 109); + this.CreateNewSubCategoryButton.Name = "CreateNewSubCategoryButton"; + this.CreateNewSubCategoryButton.Size = new System.Drawing.Size(131, 23); + this.CreateNewSubCategoryButton.TabIndex = 3; + this.CreateNewSubCategoryButton.Text = "Add as Sub-category"; + this.CreateNewSubCategoryButton.UseVisualStyleBackColor = true; + this.CreateNewSubCategoryButton.Click += new System.EventHandler(this.CreateNewSubCategoryButton_Click); + // + // CreateNewCategoryButton + // + this.CreateNewCategoryButton.Enabled = false; + this.CreateNewCategoryButton.Location = new System.Drawing.Point(9, 109); + this.CreateNewCategoryButton.Name = "CreateNewCategoryButton"; + this.CreateNewCategoryButton.Size = new System.Drawing.Size(106, 23); + this.CreateNewCategoryButton.TabIndex = 2; + this.CreateNewCategoryButton.Text = "Add as Category"; + this.CreateNewCategoryButton.UseVisualStyleBackColor = true; + this.CreateNewCategoryButton.Click += new System.EventHandler(this.CreateNewCategoryButton_Click); + // + // NewCategoryNameTextBox + // + this.NewCategoryNameTextBox.Location = new System.Drawing.Point(9, 37); + this.NewCategoryNameTextBox.Name = "NewCategoryNameTextBox"; + this.NewCategoryNameTextBox.Size = new System.Drawing.Size(243, 23); + this.NewCategoryNameTextBox.TabIndex = 1; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(9, 19); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 15); + this.label5.TabIndex = 0; + this.label5.Text = "(Sub) Category Name:"; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.CreateSubCategoryButton); + this.groupBox6.Controls.Add(this.SubCategoryPropertyNameTextBox); + this.groupBox6.Controls.Add(this.label4); + this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox6.Location = new System.Drawing.Point(267, 168); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(266, 138); + this.groupBox6.TabIndex = 5; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "Sub-Category Property"; + // + // CreateSubCategoryButton + // + this.CreateSubCategoryButton.Enabled = false; + this.CreateSubCategoryButton.Location = new System.Drawing.Point(185, 109); + this.CreateSubCategoryButton.Name = "CreateSubCategoryButton"; + this.CreateSubCategoryButton.Size = new System.Drawing.Size(75, 23); + this.CreateSubCategoryButton.TabIndex = 2; + this.CreateSubCategoryButton.Text = "Add"; + this.CreateSubCategoryButton.UseVisualStyleBackColor = true; + this.CreateSubCategoryButton.Click += new System.EventHandler(this.CreateSubCategoryButton_Click); + // + // SubCategoryPropertyNameTextBox + // + this.SubCategoryPropertyNameTextBox.Location = new System.Drawing.Point(6, 37); + this.SubCategoryPropertyNameTextBox.Name = "SubCategoryPropertyNameTextBox"; + this.SubCategoryPropertyNameTextBox.Size = new System.Drawing.Size(254, 23); + this.SubCategoryPropertyNameTextBox.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 19); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(90, 15); + this.label4.TabIndex = 0; + this.label4.Text = "Property Name:"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.SubCategoryPropertiesListBox); + this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox4.Location = new System.Drawing.Point(539, 168); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(258, 138); + this.groupBox4.TabIndex = 3; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Sub-Category Properties"; + // + // SubCategoryPropertiesListBox + // + this.SubCategoryPropertiesListBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.SubCategoryPropertiesListBox.FormattingEnabled = true; + this.SubCategoryPropertiesListBox.HorizontalScrollbar = true; + this.SubCategoryPropertiesListBox.ItemHeight = 15; + this.SubCategoryPropertiesListBox.Location = new System.Drawing.Point(3, 19); + this.SubCategoryPropertiesListBox.Name = "SubCategoryPropertiesListBox"; + this.SubCategoryPropertiesListBox.Size = new System.Drawing.Size(252, 116); + this.SubCategoryPropertiesListBox.TabIndex = 1; + // + // menuStrip2 + // + this.menuStrip2.Location = new System.Drawing.Point(0, 0); + this.menuStrip2.Name = "menuStrip2"; + this.menuStrip2.Size = new System.Drawing.Size(264, 24); + this.menuStrip2.TabIndex = 0; + this.menuStrip2.Text = "menuStrip2"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.DeleteSubCategoryButton); + this.groupBox2.Controls.Add(this.DeleteCategoryButton); + this.groupBox2.Controls.Add(this.SubCategoryComboBoxManager); + this.groupBox2.Controls.Add(this.CategoryComboBoxManager); + this.groupBox2.Controls.Add(this.label2); + this.groupBox2.Controls.Add(this.label1); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox2.Location = new System.Drawing.Point(3, 28); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(258, 134); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Category Selection"; + // + // DeleteSubCategoryButton + // + this.DeleteSubCategoryButton.Location = new System.Drawing.Point(121, 105); + this.DeleteSubCategoryButton.Name = "DeleteSubCategoryButton"; + this.DeleteSubCategoryButton.Size = new System.Drawing.Size(131, 23); + this.DeleteSubCategoryButton.TabIndex = 3; + this.DeleteSubCategoryButton.Text = "Delete Sub-Category"; + this.DeleteSubCategoryButton.UseVisualStyleBackColor = true; + this.DeleteSubCategoryButton.Click += new System.EventHandler(this.DeleteSubCategoryButton_Click); + // + // DeleteCategoryButton + // + this.DeleteCategoryButton.Location = new System.Drawing.Point(9, 105); + this.DeleteCategoryButton.Name = "DeleteCategoryButton"; + this.DeleteCategoryButton.Size = new System.Drawing.Size(106, 23); + this.DeleteCategoryButton.TabIndex = 0; + this.DeleteCategoryButton.Text = "Delete Category"; + this.DeleteCategoryButton.UseVisualStyleBackColor = true; + this.DeleteCategoryButton.Click += new System.EventHandler(this.DeleteCategoryButton_Click); + // + // SubCategoryComboBoxManager + // + this.SubCategoryComboBoxManager.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.SubCategoryComboBoxManager.FormattingEnabled = true; + this.SubCategoryComboBoxManager.Location = new System.Drawing.Point(91, 54); + this.SubCategoryComboBoxManager.Name = "SubCategoryComboBoxManager"; + this.SubCategoryComboBoxManager.Size = new System.Drawing.Size(161, 23); + this.SubCategoryComboBoxManager.TabIndex = 2; + // + // CategoryComboBoxManager + // + this.CategoryComboBoxManager.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CategoryComboBoxManager.FormattingEnabled = true; + this.CategoryComboBoxManager.Location = new System.Drawing.Point(91, 20); + this.CategoryComboBoxManager.Name = "CategoryComboBoxManager"; + this.CategoryComboBoxManager.Size = new System.Drawing.Size(161, 23); + this.CategoryComboBoxManager.TabIndex = 1; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 57); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(83, 15); + this.label2.TabIndex = 1; + this.label2.Text = "Sub-Category:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 23); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(58, 15); + this.label1.TabIndex = 0; + this.label1.Text = "Category:"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.CategoryPropertiesListBox); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(539, 28); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(258, 134); + this.groupBox3.TabIndex = 2; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Category Properties"; + // + // CategoryPropertiesListBox + // + this.CategoryPropertiesListBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.CategoryPropertiesListBox.FormattingEnabled = true; + this.CategoryPropertiesListBox.HorizontalScrollbar = true; + this.CategoryPropertiesListBox.ItemHeight = 15; + this.CategoryPropertiesListBox.Location = new System.Drawing.Point(3, 19); + this.CategoryPropertiesListBox.Name = "CategoryPropertiesListBox"; + this.CategoryPropertiesListBox.Size = new System.Drawing.Size(252, 112); + this.CategoryPropertiesListBox.TabIndex = 0; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.CategoryPropertyNameTextBox); + this.groupBox5.Controls.Add(this.CreateCategoryPropertyButton); + this.groupBox5.Controls.Add(this.label3); + this.groupBox5.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox5.Location = new System.Drawing.Point(267, 28); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(266, 134); + this.groupBox5.TabIndex = 4; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Category Property"; + // + // CategoryPropertyNameTextBox + // + this.CategoryPropertyNameTextBox.Location = new System.Drawing.Point(6, 41); + this.CategoryPropertyNameTextBox.Name = "CategoryPropertyNameTextBox"; + this.CategoryPropertyNameTextBox.Size = new System.Drawing.Size(254, 23); + this.CategoryPropertyNameTextBox.TabIndex = 4; + // + // CreateCategoryPropertyButton + // + this.CreateCategoryPropertyButton.Enabled = false; + this.CreateCategoryPropertyButton.Location = new System.Drawing.Point(185, 105); + this.CreateCategoryPropertyButton.Name = "CreateCategoryPropertyButton"; + this.CreateCategoryPropertyButton.Size = new System.Drawing.Size(75, 23); + this.CreateCategoryPropertyButton.TabIndex = 5; + this.CreateCategoryPropertyButton.Text = "Add"; + this.CreateCategoryPropertyButton.UseVisualStyleBackColor = true; + this.CreateCategoryPropertyButton.Click += new System.EventHandler(this.CreateCategoryPropertyButton_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(6, 23); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(90, 15); + this.label3.TabIndex = 0; + this.label3.Text = "Property Name:"; + // + // groupBox8 + // + this.groupBox8.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox8.Location = new System.Drawing.Point(3, 312); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(258, 135); + this.groupBox8.TabIndex = 7; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "Delete"; + // + // CategoryManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.tableLayoutPanel1); + this.Name = "CategoryManager"; + this.Text = "CategoryManager"; + this.MainLayoutPanel.ResumeLayout(false); + this.MainLayoutPanel.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.groupBox7.ResumeLayout(false); + this.groupBox7.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel MainLayoutPanel; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ComboBox SubCategoryComboBox; + private System.Windows.Forms.ComboBox CategoryComboBox; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.MenuStrip menuStrip2; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.ComboBox CategoryComboBoxManager; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox SubCategoryComboBoxManager; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.ListBox CategoryPropertiesListBox; + private System.Windows.Forms.ListBox SubCategoryPropertiesListBox; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.TextBox CategoryPropertyNameTextBox; + private System.Windows.Forms.Button CreateCategoryPropertyButton; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button CreateSubCategoryButton; + private System.Windows.Forms.TextBox SubCategoryPropertyNameTextBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button CreateNewSubCategoryButton; + private System.Windows.Forms.Button CreateNewCategoryButton; + private System.Windows.Forms.TextBox NewCategoryNameTextBox; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Button DeleteSubCategoryButton; + private System.Windows.Forms.Button DeleteCategoryButton; + private System.Windows.Forms.GroupBox groupBox8; + } +} \ No newline at end of file diff --git a/InventoryTest/CategoryManager.cs b/InventoryTest/CategoryManager.cs new file mode 100644 index 0000000..338b1cb --- /dev/null +++ b/InventoryTest/CategoryManager.cs @@ -0,0 +1,269 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.SqlClient; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace InventoryTest +{ + public partial class CategoryManager : Form + { + private static string ConnectionString { get; set; } + private static Dictionary CategoryIds { get; } = new(); + private static Dictionary SubCategoryIds { get; } = new(); + + public CategoryManager(string connectionString) + { + ConnectionString = connectionString; + + InitializeComponent(); + + CategoryComboBoxManager.SelectedIndexChanged += CategoryComboBoxManager_SelectedIndexChanged; + SubCategoryComboBoxManager.SelectedIndexChanged += SubCategoryComboBoxManager_SelectedIndexChanged; + CategoryPropertyNameTextBox.TextChanged += CategoryPropertyNameTextBox_TextChanged; + SubCategoryPropertyNameTextBox.TextChanged += SubCategoryNameTextBox_TextChanged; + NewCategoryNameTextBox.TextChanged += NewCategoryNameTextBox_TextChanged; + + LoadCategories(); + } + + private void NewCategoryNameTextBox_TextChanged(object sender, EventArgs e) + { + CreateNewCategoryButton.Enabled = !string.IsNullOrEmpty(NewCategoryNameTextBox.Text); + CreateNewSubCategoryButton.Enabled = !string.IsNullOrEmpty(NewCategoryNameTextBox.Text); + } + + private void SubCategoryNameTextBox_TextChanged(object sender, EventArgs e) + { + CreateSubCategoryButton.Enabled = !string.IsNullOrEmpty(SubCategoryPropertyNameTextBox.Text); + } + + private void CategoryPropertyNameTextBox_TextChanged(object sender, EventArgs e) + { + CreateCategoryPropertyButton.Enabled = !string.IsNullOrEmpty(CategoryPropertyNameTextBox.Text); + } + + private void SubCategoryComboBoxManager_SelectedIndexChanged(object sender, EventArgs e) + { + LoadSubCategoryProperties(); + } + + private void CategoryComboBoxManager_SelectedIndexChanged(object sender, EventArgs e) + { + SubCategoryComboBoxManager.Items.Clear(); + CategoryPropertiesListBox.Items.Clear(); + SubCategoryPropertiesListBox.Items.Clear(); + var id = CategoryIds[CategoryComboBoxManager.Text]; + SubCategoryIds.Clear(); + + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("SELECT * FROM dbo.GetCategorySubCategories(@ID)", connection); + command.Parameters.AddWithValue("ID", id); + + connection.Open(); + + var reader = command.ExecuteReader(); + + while (reader.Read()) + { + SubCategoryComboBoxManager.Items.Add(reader["Name"]); + SubCategoryIds.Add(reader["Name"].ToString(), Convert.ToInt32(reader["ID"])); + } + + reader.Close(); + + if (SubCategoryComboBoxManager.Items.Count > 0) + { + SubCategoryComboBoxManager.Enabled = true; + SubCategoryComboBoxManager.SelectedIndex = 0; + ToggleSubCategoryProperty(true); + } + else + { + ToggleSubCategoryProperty(false); + SubCategoryComboBoxManager.Enabled = false; + } + + LoadCategoryProperties(); + } + + private void LoadCategories() + { + CategoryComboBoxManager.Items.Clear(); + SubCategoryComboBoxManager.Items.Clear(); + CategoryIds.Clear(); + + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("SELECT [Category ID], [Category Name] FROM Category", connection); + + connection.Open(); + + var reader = command.ExecuteReader(); + + while (reader.Read()) + { + CategoryIds.Add(reader["Category Name"].ToString(), Convert.ToInt32(reader["Category ID"])); + CategoryComboBoxManager.Items.Add(reader["Category Name"]); + } + + reader.Close(); + + if (CategoryComboBoxManager.Items.Count > 0) + { + ToggleCategoryProperty(true); + CategoryComboBoxManager.SelectedIndex = 0; + } + else ToggleCategoryProperty(false); + } + + private void LoadCategoryProperties() + { + CategoryPropertiesListBox.Items.Clear(); + + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("SELECT * FROM GetCategoryProperties(@CategoryID)", connection); + command.Parameters.AddWithValue("CategoryID", CategoryIds[CategoryComboBoxManager.Text]); + + connection.Open(); + + var reader = command.ExecuteReader(); + + while (reader.Read()) + CategoryPropertiesListBox.Items.Add(reader["Name"]); + } + + private void LoadSubCategoryProperties() + { + SubCategoryPropertiesListBox.Items.Clear(); + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("SELECT * FROM GetSubCategoryProperties(@ID)", connection); + command.Parameters.AddWithValue("ID", SubCategoryIds[SubCategoryComboBoxManager.Text]); + + connection.Open(); + + var reader = command.ExecuteReader(); + + while (reader.Read()) + SubCategoryPropertiesListBox.Items.Add(reader["Name"]); + } + + private void ToggleSubCategoryProperty(bool enabled) + { + SubCategoryPropertyNameTextBox.Enabled = enabled; + CreateSubCategoryButton.Enabled = enabled; + DeleteSubCategoryButton.Enabled = enabled; + } + + private void ToggleCategoryProperty(bool enabled) + { + CategoryPropertyNameTextBox.Enabled = enabled; + CreateCategoryPropertyButton.Enabled = enabled; + DeleteCategoryButton.Enabled = enabled; + } + + private void CreateCategoryPropertyButton_Click(object sender, EventArgs e) + { + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("CreateCategoryPropertyByName", connection) { CommandType = CommandType.StoredProcedure }; + command.Parameters.AddWithValue("PropertyName", CategoryPropertyNameTextBox.Text); + command.Parameters.AddWithValue("CategoryID", CategoryIds[CategoryComboBoxManager.Text]); + + connection.Open(); + + command.ExecuteNonQuery(); + + LoadCategoryProperties(); + + CategoryPropertyNameTextBox.Text = string.Empty; + CategoryPropertyNameTextBox.Focus(); + } + + private void CreateSubCategoryButton_Click(object sender, EventArgs e) + { + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("CreateSubCategoryPropertyByName", connection) { CommandType = CommandType.StoredProcedure }; + command.Parameters.AddWithValue("PropertyName", SubCategoryPropertyNameTextBox.Text); + command.Parameters.AddWithValue("SubCategoryID", SubCategoryIds[SubCategoryComboBoxManager.Text]); + + connection.Open(); + + command.ExecuteNonQuery(); + + LoadSubCategoryProperties(); + + SubCategoryPropertyNameTextBox.Text = string.Empty; + SubCategoryPropertyNameTextBox.Focus(); + } + + private void CreateNewCategoryButton_Click(object sender, EventArgs e) + { + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("CreateCategory", connection) { CommandType = CommandType.StoredProcedure }; + command.Parameters.AddWithValue("Category", NewCategoryNameTextBox.Text); + + connection.Open(); + + CategoryIds.Add(NewCategoryNameTextBox.Text, Convert.ToInt32(command.ExecuteScalar())); + + CategoryComboBoxManager.Items.Add(NewCategoryNameTextBox); + + NewCategoryNameTextBox.Text = string.Empty; + NewCategoryNameTextBox.Focus(); + + if (CategoryComboBoxManager.SelectedIndex == -1) CategoryComboBoxManager.SelectedIndex = 0; + } + + private void CreateNewSubCategoryButton_Click(object sender, EventArgs e) + { + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("CreateSubCategory", connection) { CommandType = CommandType.StoredProcedure }; + command.Parameters.AddWithValue("SubCategory", NewCategoryNameTextBox.Text); + command.Parameters.AddWithValue("CategoryID", CategoryIds[CategoryComboBoxManager.Text]); + + connection.Open(); + + SubCategoryIds.Add(NewCategoryNameTextBox.Text, Convert.ToInt32(command.ExecuteScalar())); + + SubCategoryComboBoxManager.Items.Add(NewCategoryNameTextBox.Text); + + NewCategoryNameTextBox.Text = string.Empty; + NewCategoryNameTextBox.Focus(); + + SubCategoryComboBoxManager.Enabled = true; + + if (SubCategoryComboBoxManager.SelectedIndex == -1) SubCategoryComboBoxManager.SelectedIndex = 0; + } + + private void DeleteCategoryButton_Click(object sender, EventArgs e) + { + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("DeleteCategory", connection) { CommandType = CommandType.StoredProcedure }; + command.Parameters.AddWithValue("CategoryID", CategoryIds[CategoryComboBoxManager.Text]); + + connection.Open(); + + command.ExecuteNonQuery(); + + LoadCategories(); + } + + private void DeleteSubCategoryButton_Click(object sender, EventArgs e) + { + using var connection = new SqlConnection(ConnectionString); + using var command = new SqlCommand("DeleteSubCategory", connection) { CommandType = CommandType.StoredProcedure }; + command.Parameters.AddWithValue("SubCategoryID", SubCategoryIds[SubCategoryComboBoxManager.Text]); + + connection.Open(); + + command.ExecuteNonQuery(); + + SubCategoryIds.Remove(SubCategoryComboBoxManager.Text); + SubCategoryComboBoxManager.Items.RemoveAt(SubCategoryComboBoxManager.SelectedIndex); + } + } +} diff --git a/InventoryTest/CategoryManager.resx b/InventoryTest/CategoryManager.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/InventoryTest/CategoryManager.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/InventoryTest/Form1.Designer.cs b/InventoryTest/Form1.Designer.cs new file mode 100644 index 0000000..0d3fbee --- /dev/null +++ b/InventoryTest/Form1.Designer.cs @@ -0,0 +1,374 @@ + +namespace InventoryTest +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.MainLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.printToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.printPreviewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ManageCategoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.indexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.MainLayoutPanel.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // MainLayoutPanel + // + this.MainLayoutPanel.ColumnCount = 3; + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34F)); + this.MainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.MainLayoutPanel.Controls.Add(this.menuStrip1, 0, 0); + this.MainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.MainLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.MainLayoutPanel.Name = "MainLayoutPanel"; + this.MainLayoutPanel.RowCount = 4; + this.MainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.MainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.MainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 34F)); + this.MainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.MainLayoutPanel.Size = new System.Drawing.Size(800, 450); + this.MainLayoutPanel.TabIndex = 0; + // + // menuStrip1 + // + this.MainLayoutPanel.SetColumnSpan(this.menuStrip1, 3); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.editToolStripMenuItem, + this.toolsToolStripMenuItem, + this.helpToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(800, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.toolStripSeparator, + this.saveToolStripMenuItem, + this.saveAsToolStripMenuItem, + this.toolStripSeparator1, + this.printToolStripMenuItem, + this.printPreviewToolStripMenuItem, + this.toolStripSeparator2, + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "&File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image"))); + this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); + this.newToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.newToolStripMenuItem.Text = "&New"; + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image"))); + this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); + this.openToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.openToolStripMenuItem.Text = "&Open"; + // + // toolStripSeparator + // + this.toolStripSeparator.Name = "toolStripSeparator"; + this.toolStripSeparator.Size = new System.Drawing.Size(143, 6); + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image"))); + this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); + this.saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.saveToolStripMenuItem.Text = "&Save"; + // + // saveAsToolStripMenuItem + // + this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.saveAsToolStripMenuItem.Text = "Save &As"; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(143, 6); + // + // printToolStripMenuItem + // + this.printToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripMenuItem.Image"))); + this.printToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.printToolStripMenuItem.Name = "printToolStripMenuItem"; + this.printToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P))); + this.printToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.printToolStripMenuItem.Text = "&Print"; + // + // printPreviewToolStripMenuItem + // + this.printPreviewToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printPreviewToolStripMenuItem.Image"))); + this.printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.printPreviewToolStripMenuItem.Name = "printPreviewToolStripMenuItem"; + this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.printPreviewToolStripMenuItem.Text = "Print Pre&view"; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(143, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.undoToolStripMenuItem, + this.redoToolStripMenuItem, + this.toolStripSeparator3, + this.cutToolStripMenuItem, + this.copyToolStripMenuItem, + this.pasteToolStripMenuItem, + this.toolStripSeparator4, + this.selectAllToolStripMenuItem}); + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.editToolStripMenuItem.Text = "&Edit"; + // + // undoToolStripMenuItem + // + this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; + this.undoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.undoToolStripMenuItem.Size = new System.Drawing.Size(144, 22); + this.undoToolStripMenuItem.Text = "&Undo"; + // + // redoToolStripMenuItem + // + this.redoToolStripMenuItem.Name = "redoToolStripMenuItem"; + this.redoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.redoToolStripMenuItem.Size = new System.Drawing.Size(144, 22); + this.redoToolStripMenuItem.Text = "&Redo"; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(141, 6); + // + // cutToolStripMenuItem + // + this.cutToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripMenuItem.Image"))); + this.cutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.cutToolStripMenuItem.Name = "cutToolStripMenuItem"; + this.cutToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.cutToolStripMenuItem.Size = new System.Drawing.Size(144, 22); + this.cutToolStripMenuItem.Text = "Cu&t"; + // + // copyToolStripMenuItem + // + this.copyToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripMenuItem.Image"))); + this.copyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; + this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.copyToolStripMenuItem.Size = new System.Drawing.Size(144, 22); + this.copyToolStripMenuItem.Text = "&Copy"; + // + // pasteToolStripMenuItem + // + this.pasteToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripMenuItem.Image"))); + this.pasteToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; + this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; + this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.pasteToolStripMenuItem.Size = new System.Drawing.Size(144, 22); + this.pasteToolStripMenuItem.Text = "&Paste"; + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(141, 6); + // + // selectAllToolStripMenuItem + // + this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem"; + this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(144, 22); + this.selectAllToolStripMenuItem.Text = "Select &All"; + // + // toolsToolStripMenuItem + // + this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ManageCategoriesToolStripMenuItem, + this.optionsToolStripMenuItem}); + this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; + this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20); + this.toolsToolStripMenuItem.Text = "&Tools"; + // + // ManageCategoriesToolStripMenuItem + // + this.ManageCategoriesToolStripMenuItem.Name = "ManageCategoriesToolStripMenuItem"; + this.ManageCategoriesToolStripMenuItem.Size = new System.Drawing.Size(176, 22); + this.ManageCategoriesToolStripMenuItem.Text = "Manage &Categories"; + // + // optionsToolStripMenuItem + // + this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(176, 22); + this.optionsToolStripMenuItem.Text = "&Options"; + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.contentsToolStripMenuItem, + this.indexToolStripMenuItem, + this.searchToolStripMenuItem, + this.toolStripSeparator5, + this.aboutToolStripMenuItem}); + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.helpToolStripMenuItem.Text = "&Help"; + // + // contentsToolStripMenuItem + // + this.contentsToolStripMenuItem.Name = "contentsToolStripMenuItem"; + this.contentsToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.contentsToolStripMenuItem.Text = "&Contents"; + // + // indexToolStripMenuItem + // + this.indexToolStripMenuItem.Name = "indexToolStripMenuItem"; + this.indexToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.indexToolStripMenuItem.Text = "&Index"; + // + // searchToolStripMenuItem + // + this.searchToolStripMenuItem.Name = "searchToolStripMenuItem"; + this.searchToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.searchToolStripMenuItem.Text = "&Search"; + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(119, 6); + // + // aboutToolStripMenuItem + // + this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.aboutToolStripMenuItem.Text = "&About..."; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.MainLayoutPanel); + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "Form1"; + this.MainLayoutPanel.ResumeLayout(false); + this.MainLayoutPanel.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel MainLayoutPanel; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem printToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem printPreviewToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripMenuItem cutToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ManageCategoriesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem contentsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem indexToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem searchToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; + } +} + diff --git a/InventoryTest/Form1.cs b/InventoryTest/Form1.cs new file mode 100644 index 0000000..53fd6a0 --- /dev/null +++ b/InventoryTest/Form1.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.SqlClient; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace InventoryTest +{ + public partial class Form1 : Form + { + private static string ConnectionString { get; } = "Server=DESKTOP-HJES64T;Database=main;Integrated Security=true;"; + + public Form1() + { + InitializeComponent(); + + ManageCategoriesToolStripMenuItem.Click += ShowCategoryManagerForm; + } + + private void ShowCategoryManagerForm(object sender, EventArgs e) + { + var form = new CategoryManager(ConnectionString); + form.Show(); + } + } +} diff --git a/InventoryTest/Form1.resx b/InventoryTest/Form1.resx new file mode 100644 index 0000000..8fcf441 --- /dev/null +++ b/InventoryTest/Form1.resx @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABiSURBVDhP7czBCoAwCIBhn80nifnq1cVDddHjQtogtjbb + NRJ+BuI+yCMi0UtVp3Rejx0gYjMiiszcRjKwb0eV7UOgPuIBy7z2EQ+w947Yffp6jQeUDQFlP/B94G2P + wGgAACcYuZjJw4fhNwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFTSURBVDhPlZK9SgNBFIXnCcQnkLyA4CPkHayFdBY22ppG + S0vLiEUEQS0EK4kWIkaiFgYJwYUgWQ24wSRkV/evHOfczMQxsyPrwIGd4dxvzr2zbHZFUbSUJMlTmqYl + eZR/yeJgba/O7513nhsijAWhYhzH6wLAFzdO+dzKQT6IKKqiCKo9uqSTeocACiI8W9JuLhRWLtpkZsv7 + hhZWjwiOdEgpVZDlE4B+G/b9UTBt47bZ4h/PNe57zlTR1xjAKgGc3pBuKh8+UDGkz2DUveMv55u/9Haz + Sz5KohIAgt6xV6+ggLqQABB8UwLEabRdgugpbNIBmAfDgXu1QweAqT5tGnauCYBv1BBAEbP6tal7uW0C + MJxZo0391tnkJRTgc+Aapr8Ujr2fGeDAax4bJpt6jQoPw/CVXkFED1CMnrLMWcKs8GcSQMQoAYIZ/Ee+ + 788zxtg3DfyyePrZw2oAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABzSURBVDhPY/j69WvDt2/f/pODQXoZQIyYCfv+MwTPIQmD + 9ID0gg3ApoAYjGHAh/cficLD2QBS8SA1AJufkTGyWtoagM5HFwdhmAEfkPMCukJkzcjiIAw24MuXLwbI + hqArRNaMLA7CYANAAGYISIA0/O0/AID67ECmnhNDAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAY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MA6vZVkuU6g7OTiR7cOMfTscDraQSJKEdW5C/w9empGv18JGEAT7rw+M4IxIg6LL5d02 + YAqXM3GWshkk2JEixPp1w+XQrprQFSJ+i6f669v+3ojrurbB2eXQUiPlcwNbYAT35sd+uVdVZYWPOBqP + 4/i8NKDr8XiygjRNF5c9zhYDc9m8ge65x0n5DBEvru5f9i/HfWY87xeZHuplYWIClgAAAABJRU5ErkJg + gg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB4SURBVDhPtc9RCoAgDMbxzuZJAo9pN/KhetkejQWD/HLq + oAZ/ItIfbZEhomLFzOt9qDdyMITwKsZYcs5jRIFjP6tS2uYQC0DEXKkF6BrPzL+xAHw3V5oF5NlEPICk + iNxzAZgLwP4BsNZFTb5XAOYCcD4DRnWBuahc6R2LWkqXAfkAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACaSURBVDhPvZFBCsMgEEU9Qs/k2TyGe6/RrWdxYRPEbcof + /MTaZGpa6MDDcfQ/AzFj5ZxvpZR7rXUD6DFrx58LAe/9Zq0V0GPWjo+Lr4GUkgSdcwL6/hy02F4Y8kXy + yIswzlUBAwz3Eq5TgiOmBRr/EazLKn8ixqjyIhoFuIC9xpTg7EumBVx7LgtGQgjnAsJLGm+Cb2jxX8qY + J5nBJhUlLbsqAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/InventoryTest/InventoryTest.csproj b/InventoryTest/InventoryTest.csproj new file mode 100644 index 0000000..95000d5 --- /dev/null +++ b/InventoryTest/InventoryTest.csproj @@ -0,0 +1,13 @@ + + + + WinExe + net5.0-windows + true + + + + + + + \ No newline at end of file diff --git a/InventoryTest/InventoryTest.csproj.user b/InventoryTest/InventoryTest.csproj.user new file mode 100644 index 0000000..29da961 --- /dev/null +++ b/InventoryTest/InventoryTest.csproj.user @@ -0,0 +1,11 @@ + + + + + Form + + + Form + + + \ No newline at end of file diff --git a/InventoryTest/Program.cs b/InventoryTest/Program.cs new file mode 100644 index 0000000..5a497ed --- /dev/null +++ b/InventoryTest/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace InventoryTest +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +}