diff --git a/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.Designer.cs b/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.Designer.cs index f1c4807..3ff5155 100644 --- a/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.Designer.cs +++ b/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.Designer.cs @@ -28,204 +28,218 @@ /// private void InitializeComponent() { - this.LocationListBox = new System.Windows.Forms.ListBox(); - this.LocationTextBox = new System.Windows.Forms.TextBox(); - this.LocationLabel = new System.Windows.Forms.Label(); - this.LocationSearchButton = new System.Windows.Forms.Button(); - this.RentDateLabel = new System.Windows.Forms.Label(); - this.PaymentDateLabel = new System.Windows.Forms.Label(); - this.RentInsertButton = new System.Windows.Forms.Button(); - this.RentDateTimePicker = new System.Windows.Forms.DateTimePicker(); - this.ADDLocationListBox = new System.Windows.Forms.ListBox(); - this.ADDLocationLabel = new System.Windows.Forms.Label(); - this.ADDLocationButton = new System.Windows.Forms.Button(); - this.UserDisplaylistBox = new System.Windows.Forms.ListBox(); - this.UserDisplayLabel = new System.Windows.Forms.Label(); - this.ShowRentListBox = new System.Windows.Forms.ListBox(); - this.ShowRentLabel = new System.Windows.Forms.Label(); - this.ShowRentButton = new System.Windows.Forms.Button(); - this.RentedTextBox = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // LocationListBox - // - this.LocationListBox.FormattingEnabled = true; - this.LocationListBox.ItemHeight = 16; - this.LocationListBox.Location = new System.Drawing.Point(12, 145); - this.LocationListBox.Name = "LocationListBox"; - this.LocationListBox.Size = new System.Drawing.Size(196, 244); - this.LocationListBox.TabIndex = 0; - // - // LocationTextBox - // - this.LocationTextBox.Location = new System.Drawing.Point(12, 93); - this.LocationTextBox.Name = "LocationTextBox"; - this.LocationTextBox.Size = new System.Drawing.Size(100, 22); - this.LocationTextBox.TabIndex = 1; - // - // LocationLabel - // - this.LocationLabel.AutoSize = true; - this.LocationLabel.Location = new System.Drawing.Point(12, 53); - this.LocationLabel.Name = "LocationLabel"; - this.LocationLabel.Size = new System.Drawing.Size(135, 17); - this.LocationLabel.TabIndex = 2; - this.LocationLabel.Text = "Locations-Searched"; - // - // LocationSearchButton - // - this.LocationSearchButton.Location = new System.Drawing.Point(118, 92); - this.LocationSearchButton.Name = "LocationSearchButton"; - this.LocationSearchButton.Size = new System.Drawing.Size(75, 23); - this.LocationSearchButton.TabIndex = 3; - this.LocationSearchButton.Text = "Search"; - this.LocationSearchButton.UseVisualStyleBackColor = true; - this.LocationSearchButton.Click += new System.EventHandler(this.LocationSearchButton_Click); - // - // RentDateLabel - // - this.RentDateLabel.AutoSize = true; - this.RentDateLabel.Location = new System.Drawing.Point(250, 98); - this.RentDateLabel.Name = "RentDateLabel"; - this.RentDateLabel.Size = new System.Drawing.Size(73, 17); - this.RentDateLabel.TabIndex = 20; - this.RentDateLabel.Text = "Rent-Date"; - // - // PaymentDateLabel - // - this.PaymentDateLabel.AutoSize = true; - this.PaymentDateLabel.Location = new System.Drawing.Point(500, 258); - this.PaymentDateLabel.Name = "PaymentDateLabel"; - this.PaymentDateLabel.Size = new System.Drawing.Size(0, 17); - this.PaymentDateLabel.TabIndex = 18; - // - // RentInsertButton - // - this.RentInsertButton.Location = new System.Drawing.Point(470, 395); - this.RentInsertButton.Name = "RentInsertButton"; - this.RentInsertButton.Size = new System.Drawing.Size(101, 23); - this.RentInsertButton.TabIndex = 17; - this.RentInsertButton.Text = "Rent"; - this.RentInsertButton.UseVisualStyleBackColor = true; - this.RentInsertButton.Click += new System.EventHandler(this.RentInsertButton_Click); - // - // RentDateTimePicker - // - this.RentDateTimePicker.Location = new System.Drawing.Point(329, 94); - this.RentDateTimePicker.Name = "RentDateTimePicker"; - this.RentDateTimePicker.Size = new System.Drawing.Size(242, 22); - this.RentDateTimePicker.TabIndex = 21; - // - // ADDLocationListBox - // - this.ADDLocationListBox.FormattingEnabled = true; - this.ADDLocationListBox.ItemHeight = 16; - this.ADDLocationListBox.Location = new System.Drawing.Point(329, 145); - this.ADDLocationListBox.Name = "ADDLocationListBox"; - this.ADDLocationListBox.Size = new System.Drawing.Size(242, 244); - this.ADDLocationListBox.TabIndex = 23; - // - // ADDLocationLabel - // - this.ADDLocationLabel.AutoSize = true; - this.ADDLocationLabel.Location = new System.Drawing.Point(326, 53); - this.ADDLocationLabel.Name = "ADDLocationLabel"; - this.ADDLocationLabel.Size = new System.Drawing.Size(115, 17); - this.ADDLocationLabel.TabIndex = 24; - this.ADDLocationLabel.Text = "Locations-Added"; - // - // ADDLocationButton - // - this.ADDLocationButton.Location = new System.Drawing.Point(228, 183); - this.ADDLocationButton.Name = "ADDLocationButton"; - this.ADDLocationButton.Size = new System.Drawing.Size(75, 23); - this.ADDLocationButton.TabIndex = 25; - this.ADDLocationButton.Text = "ADD"; - this.ADDLocationButton.UseVisualStyleBackColor = true; - this.ADDLocationButton.Click += new System.EventHandler(this.ADDLocationButton_Click); - // - // UserDisplaylistBox - // - this.UserDisplaylistBox.FormattingEnabled = true; - this.UserDisplaylistBox.ItemHeight = 16; - this.UserDisplaylistBox.Location = new System.Drawing.Point(133, 13); - this.UserDisplaylistBox.Name = "UserDisplaylistBox"; - this.UserDisplaylistBox.Size = new System.Drawing.Size(257, 20); - this.UserDisplaylistBox.TabIndex = 26; - // - // UserDisplayLabel - // - this.UserDisplayLabel.AutoSize = true; - this.UserDisplayLabel.Location = new System.Drawing.Point(12, 13); - this.UserDisplayLabel.Name = "UserDisplayLabel"; - this.UserDisplayLabel.Size = new System.Drawing.Size(94, 17); - this.UserDisplayLabel.TabIndex = 27; - this.UserDisplayLabel.Text = "Logged in as:"; - // - // ShowRentListBox - // - this.ShowRentListBox.FormattingEnabled = true; - this.ShowRentListBox.ItemHeight = 16; - this.ShowRentListBox.Location = new System.Drawing.Point(675, 145); - this.ShowRentListBox.Name = "ShowRentListBox"; - this.ShowRentListBox.Size = new System.Drawing.Size(629, 244); - this.ShowRentListBox.TabIndex = 28; - this.ShowRentListBox.SelectedIndexChanged += new System.EventHandler(this.ShowRentListBox_SelectedIndexChanged); - // - // ShowRentLabel - // - this.ShowRentLabel.AutoSize = true; - this.ShowRentLabel.Location = new System.Drawing.Point(672, 53); - this.ShowRentLabel.Name = "ShowRentLabel"; - this.ShowRentLabel.Size = new System.Drawing.Size(120, 17); - this.ShowRentLabel.TabIndex = 29; - this.ShowRentLabel.Text = "Rented-Locations"; - // - // ShowRentButton - // - this.ShowRentButton.Location = new System.Drawing.Point(781, 92); - this.ShowRentButton.Name = "ShowRentButton"; - this.ShowRentButton.Size = new System.Drawing.Size(75, 23); - this.ShowRentButton.TabIndex = 30; - this.ShowRentButton.Text = "Show"; - this.ShowRentButton.UseVisualStyleBackColor = true; - this.ShowRentButton.Click += new System.EventHandler(this.ShowRentButton_Click); - // - // RentedTextBox - // - this.RentedTextBox.Location = new System.Drawing.Point(675, 93); - this.RentedTextBox.Name = "RentedTextBox"; - this.RentedTextBox.Size = new System.Drawing.Size(100, 22); - this.RentedTextBox.TabIndex = 31; - // - // Dashboard - // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1465, 483); - this.Controls.Add(this.RentedTextBox); - this.Controls.Add(this.ShowRentButton); - this.Controls.Add(this.ShowRentLabel); - this.Controls.Add(this.ShowRentListBox); - this.Controls.Add(this.UserDisplayLabel); - this.Controls.Add(this.UserDisplaylistBox); - this.Controls.Add(this.ADDLocationButton); - this.Controls.Add(this.ADDLocationLabel); - this.Controls.Add(this.ADDLocationListBox); - this.Controls.Add(this.RentDateTimePicker); - this.Controls.Add(this.RentDateLabel); - this.Controls.Add(this.PaymentDateLabel); - this.Controls.Add(this.RentInsertButton); - this.Controls.Add(this.LocationSearchButton); - this.Controls.Add(this.LocationLabel); - this.Controls.Add(this.LocationTextBox); - this.Controls.Add(this.LocationListBox); - this.Name = "Dashboard"; - this.Text = "Dashboard"; - this.Load += new System.EventHandler(this.Dashboard_Load); - this.ResumeLayout(false); - this.PerformLayout(); - + this.LocationListBox = new System.Windows.Forms.ListBox(); + this.LocationTextBox = new System.Windows.Forms.TextBox(); + this.LocationLabel = new System.Windows.Forms.Label(); + this.LocationSearchButton = new System.Windows.Forms.Button(); + this.RentDateLabel = new System.Windows.Forms.Label(); + this.PaymentDateLabel = new System.Windows.Forms.Label(); + this.RentInsertButton = new System.Windows.Forms.Button(); + this.RentDateTimePicker = new System.Windows.Forms.DateTimePicker(); + this.ADDLocationListBox = new System.Windows.Forms.ListBox(); + this.ADDLocationLabel = new System.Windows.Forms.Label(); + this.ADDLocationButton = new System.Windows.Forms.Button(); + this.UserDisplaylistBox = new System.Windows.Forms.ListBox(); + this.UserDisplayLabel = new System.Windows.Forms.Label(); + this.ShowRentListBox = new System.Windows.Forms.ListBox(); + this.ShowRentLabel = new System.Windows.Forms.Label(); + this.ShowRentButton = new System.Windows.Forms.Button(); + this.RentedTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // LocationListBox + // + this.LocationListBox.FormattingEnabled = true; + this.LocationListBox.Location = new System.Drawing.Point(9, 118); + this.LocationListBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.LocationListBox.Name = "LocationListBox"; + this.LocationListBox.Size = new System.Drawing.Size(148, 199); + this.LocationListBox.TabIndex = 0; + // + // LocationTextBox + // + this.LocationTextBox.Location = new System.Drawing.Point(9, 76); + this.LocationTextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.LocationTextBox.Name = "LocationTextBox"; + this.LocationTextBox.Size = new System.Drawing.Size(76, 20); + this.LocationTextBox.TabIndex = 1; + // + // LocationLabel + // + this.LocationLabel.AutoSize = true; + this.LocationLabel.Location = new System.Drawing.Point(9, 43); + this.LocationLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.LocationLabel.Name = "LocationLabel"; + this.LocationLabel.Size = new System.Drawing.Size(102, 13); + this.LocationLabel.TabIndex = 2; + this.LocationLabel.Text = "Locations-Searched"; + // + // LocationSearchButton + // + this.LocationSearchButton.Location = new System.Drawing.Point(88, 75); + this.LocationSearchButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.LocationSearchButton.Name = "LocationSearchButton"; + this.LocationSearchButton.Size = new System.Drawing.Size(56, 19); + this.LocationSearchButton.TabIndex = 3; + this.LocationSearchButton.Text = "Search"; + this.LocationSearchButton.UseVisualStyleBackColor = true; + this.LocationSearchButton.Click += new System.EventHandler(this.LocationSearchButton_Click); + // + // RentDateLabel + // + this.RentDateLabel.AutoSize = true; + this.RentDateLabel.Location = new System.Drawing.Point(188, 80); + this.RentDateLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.RentDateLabel.Name = "RentDateLabel"; + this.RentDateLabel.Size = new System.Drawing.Size(56, 13); + this.RentDateLabel.TabIndex = 20; + this.RentDateLabel.Text = "Rent-Date"; + // + // PaymentDateLabel + // + this.PaymentDateLabel.AutoSize = true; + this.PaymentDateLabel.Location = new System.Drawing.Point(375, 210); + this.PaymentDateLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.PaymentDateLabel.Name = "PaymentDateLabel"; + this.PaymentDateLabel.Size = new System.Drawing.Size(0, 13); + this.PaymentDateLabel.TabIndex = 18; + // + // RentInsertButton + // + this.RentInsertButton.Location = new System.Drawing.Point(352, 321); + this.RentInsertButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.RentInsertButton.Name = "RentInsertButton"; + this.RentInsertButton.Size = new System.Drawing.Size(76, 19); + this.RentInsertButton.TabIndex = 17; + this.RentInsertButton.Text = "Rent"; + this.RentInsertButton.UseVisualStyleBackColor = true; + this.RentInsertButton.Click += new System.EventHandler(this.RentInsertButton_Click); + // + // RentDateTimePicker + // + this.RentDateTimePicker.Location = new System.Drawing.Point(247, 76); + this.RentDateTimePicker.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.RentDateTimePicker.Name = "RentDateTimePicker"; + this.RentDateTimePicker.Size = new System.Drawing.Size(182, 20); + this.RentDateTimePicker.TabIndex = 21; + // + // ADDLocationListBox + // + this.ADDLocationListBox.FormattingEnabled = true; + this.ADDLocationListBox.Location = new System.Drawing.Point(247, 118); + this.ADDLocationListBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ADDLocationListBox.Name = "ADDLocationListBox"; + this.ADDLocationListBox.Size = new System.Drawing.Size(182, 199); + this.ADDLocationListBox.TabIndex = 23; + // + // ADDLocationLabel + // + this.ADDLocationLabel.AutoSize = true; + this.ADDLocationLabel.Location = new System.Drawing.Point(244, 43); + this.ADDLocationLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ADDLocationLabel.Name = "ADDLocationLabel"; + this.ADDLocationLabel.Size = new System.Drawing.Size(87, 13); + this.ADDLocationLabel.TabIndex = 24; + this.ADDLocationLabel.Text = "Locations-Added"; + // + // ADDLocationButton + // + this.ADDLocationButton.Location = new System.Drawing.Point(171, 149); + this.ADDLocationButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ADDLocationButton.Name = "ADDLocationButton"; + this.ADDLocationButton.Size = new System.Drawing.Size(56, 19); + this.ADDLocationButton.TabIndex = 25; + this.ADDLocationButton.Text = "ADD"; + this.ADDLocationButton.UseVisualStyleBackColor = true; + this.ADDLocationButton.Click += new System.EventHandler(this.ADDLocationButton_Click); + // + // UserDisplaylistBox + // + this.UserDisplaylistBox.FormattingEnabled = true; + this.UserDisplaylistBox.Location = new System.Drawing.Point(100, 11); + this.UserDisplaylistBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.UserDisplaylistBox.Name = "UserDisplaylistBox"; + this.UserDisplaylistBox.Size = new System.Drawing.Size(194, 17); + this.UserDisplaylistBox.TabIndex = 26; + // + // UserDisplayLabel + // + this.UserDisplayLabel.AutoSize = true; + this.UserDisplayLabel.Location = new System.Drawing.Point(9, 11); + this.UserDisplayLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.UserDisplayLabel.Name = "UserDisplayLabel"; + this.UserDisplayLabel.Size = new System.Drawing.Size(71, 13); + this.UserDisplayLabel.TabIndex = 27; + this.UserDisplayLabel.Text = "Logged in as:"; + // + // ShowRentListBox + // + this.ShowRentListBox.FormattingEnabled = true; + this.ShowRentListBox.Location = new System.Drawing.Point(473, 118); + this.ShowRentListBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ShowRentListBox.Name = "ShowRentListBox"; + this.ShowRentListBox.Size = new System.Drawing.Size(367, 199); + this.ShowRentListBox.TabIndex = 28; + this.ShowRentListBox.SelectedIndexChanged += new System.EventHandler(this.ShowRentListBox_SelectedIndexChanged); + // + // ShowRentLabel + // + this.ShowRentLabel.AutoSize = true; + this.ShowRentLabel.Location = new System.Drawing.Point(470, 43); + this.ShowRentLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ShowRentLabel.Name = "ShowRentLabel"; + this.ShowRentLabel.Size = new System.Drawing.Size(91, 13); + this.ShowRentLabel.TabIndex = 29; + this.ShowRentLabel.Text = "Rented-Locations"; + // + // ShowRentButton + // + this.ShowRentButton.Location = new System.Drawing.Point(553, 77); + this.ShowRentButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ShowRentButton.Name = "ShowRentButton"; + this.ShowRentButton.Size = new System.Drawing.Size(56, 19); + this.ShowRentButton.TabIndex = 30; + this.ShowRentButton.Text = "Show"; + this.ShowRentButton.UseVisualStyleBackColor = true; + this.ShowRentButton.Click += new System.EventHandler(this.ShowRentButton_Click); + // + // RentedTextBox + // + this.RentedTextBox.Location = new System.Drawing.Point(473, 77); + this.RentedTextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.RentedTextBox.Name = "RentedTextBox"; + this.RentedTextBox.Size = new System.Drawing.Size(76, 20); + this.RentedTextBox.TabIndex = 31; + // + // Dashboard + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(858, 392); + this.Controls.Add(this.RentedTextBox); + this.Controls.Add(this.ShowRentButton); + this.Controls.Add(this.ShowRentLabel); + this.Controls.Add(this.ShowRentListBox); + this.Controls.Add(this.UserDisplayLabel); + this.Controls.Add(this.UserDisplaylistBox); + this.Controls.Add(this.ADDLocationButton); + this.Controls.Add(this.ADDLocationLabel); + this.Controls.Add(this.ADDLocationListBox); + this.Controls.Add(this.RentDateTimePicker); + this.Controls.Add(this.RentDateLabel); + this.Controls.Add(this.PaymentDateLabel); + this.Controls.Add(this.RentInsertButton); + this.Controls.Add(this.LocationSearchButton); + this.Controls.Add(this.LocationLabel); + this.Controls.Add(this.LocationTextBox); + this.Controls.Add(this.LocationListBox); + this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Name = "Dashboard"; + this.Text = "Dashboard"; + this.Load += new System.EventHandler(this.Dashboard_Load); + this.ResumeLayout(false); + this.PerformLayout(); + } #endregion diff --git a/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.resx b/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.resx index 1af7de1..29dcb1b 100644 --- a/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.resx +++ b/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/Dashboard.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/DataAccess.cs b/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/DataAccess.cs index 106254c..359c93e 100644 --- a/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/DataAccess.cs +++ b/csharp/marketconnectionNET2.0/db_AI-4_V3/db_AI-4/DataAccess.cs @@ -62,10 +62,10 @@ namespace db_AI_4 { List rents = new List(); - rents.Add(new GetRents { rent_date = RentDate, member_id = MemberID, rent_price_id = RentPriceID, }); + rents.Add(new GetRents { rent_date = RentDate, member_id = 1, rent_price_id = RentPriceID, location_id = 1}); - connection.Execute("INSERT INTO dbo.rents (rent_date, member_id, rent_price_id)" + - " VALUES (@rent_date, @member_id, @rent_price_id )", rents); + connection.Execute("INSERT INTO dbo.rents (rent_date, member_id, rent_price_id, location_id)" + + " VALUES (@rent_date, @member_id, @rent_price_id, @location_id )", rents); } } // Insert Rents into Database end