Merge branch 'andreas' of git.2li.ch:ibz/db_AI-4 into andreas

This commit is contained in:
Andreas Zweili 2017-08-28 23:56:33 +02:00
commit 9257314cf0
3 changed files with 334 additions and 320 deletions

View File

@ -50,33 +50,36 @@
// LocationListBox
//
this.LocationListBox.FormattingEnabled = true;
this.LocationListBox.ItemHeight = 16;
this.LocationListBox.Location = new System.Drawing.Point(12, 145);
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(196, 244);
this.LocationListBox.Size = new System.Drawing.Size(148, 199);
this.LocationListBox.TabIndex = 0;
//
// LocationTextBox
//
this.LocationTextBox.Location = new System.Drawing.Point(12, 93);
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(100, 22);
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(12, 53);
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(135, 17);
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(118, 92);
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(75, 23);
this.LocationSearchButton.Size = new System.Drawing.Size(56, 19);
this.LocationSearchButton.TabIndex = 3;
this.LocationSearchButton.Text = "Search";
this.LocationSearchButton.UseVisualStyleBackColor = true;
@ -85,25 +88,28 @@
// RentDateLabel
//
this.RentDateLabel.AutoSize = true;
this.RentDateLabel.Location = new System.Drawing.Point(250, 98);
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(73, 17);
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(500, 258);
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, 17);
this.PaymentDateLabel.Size = new System.Drawing.Size(0, 13);
this.PaymentDateLabel.TabIndex = 18;
//
// RentInsertButton
//
this.RentInsertButton.Location = new System.Drawing.Point(470, 395);
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(101, 23);
this.RentInsertButton.Size = new System.Drawing.Size(76, 19);
this.RentInsertButton.TabIndex = 17;
this.RentInsertButton.Text = "Rent";
this.RentInsertButton.UseVisualStyleBackColor = true;
@ -111,34 +117,37 @@
//
// RentDateTimePicker
//
this.RentDateTimePicker.Location = new System.Drawing.Point(329, 94);
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(242, 22);
this.RentDateTimePicker.Size = new System.Drawing.Size(182, 20);
this.RentDateTimePicker.TabIndex = 21;
//
// ADDLocationListBox
//
this.ADDLocationListBox.FormattingEnabled = true;
this.ADDLocationListBox.ItemHeight = 16;
this.ADDLocationListBox.Location = new System.Drawing.Point(329, 145);
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(242, 244);
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(326, 53);
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(115, 17);
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(228, 183);
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(75, 23);
this.ADDLocationButton.Size = new System.Drawing.Size(56, 19);
this.ADDLocationButton.TabIndex = 25;
this.ADDLocationButton.Text = "ADD";
this.ADDLocationButton.UseVisualStyleBackColor = true;
@ -147,45 +156,48 @@
// UserDisplaylistBox
//
this.UserDisplaylistBox.FormattingEnabled = true;
this.UserDisplaylistBox.ItemHeight = 16;
this.UserDisplaylistBox.Location = new System.Drawing.Point(133, 13);
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(257, 20);
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(12, 13);
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(94, 17);
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.ItemHeight = 16;
this.ShowRentListBox.Location = new System.Drawing.Point(675, 145);
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(629, 244);
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(672, 53);
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(120, 17);
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(781, 92);
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(75, 23);
this.ShowRentButton.Size = new System.Drawing.Size(56, 19);
this.ShowRentButton.TabIndex = 30;
this.ShowRentButton.Text = "Show";
this.ShowRentButton.UseVisualStyleBackColor = true;
@ -193,16 +205,17 @@
//
// RentedTextBox
//
this.RentedTextBox.Location = new System.Drawing.Point(675, 93);
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(100, 22);
this.RentedTextBox.Size = new System.Drawing.Size(76, 20);
this.RentedTextBox.TabIndex = 31;
//
// Dashboard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1465, 483);
this.ClientSize = new System.Drawing.Size(858, 392);
this.Controls.Add(this.RentedTextBox);
this.Controls.Add(this.ShowRentButton);
this.Controls.Add(this.ShowRentLabel);
@ -220,6 +233,7 @@
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);

View File

@ -62,10 +62,10 @@ namespace db_AI_4
{
List<GetRents> rents = new List<GetRents>();
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