Merge branch 'izy' into andreas

This commit is contained in:
Andreas Zweili 2017-07-27 16:34:21 +02:00
commit 5c1f7e0465
2 changed files with 30 additions and 6 deletions

View File

@ -20,7 +20,7 @@ namespace db_AI_4
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(Helper.CnnVal("marketdb")))
{
var output = connection.Query<GetLocations>($"SELECT * FROM locations WHERE location_name = '{ LocationName }'").ToList();
var output = connection.Query<GetLocations>($"SELECT * FROM locations WHERE location_name like '%{ LocationName }%'").ToList();
return output;
}
@ -104,7 +104,7 @@ namespace db_AI_4
}
else
{
MessageBox.Show("username or passord not correct");
MessageBox.Show("Username or Password not correct");
}
//CheckLogin function end

View File

@ -33,11 +33,13 @@
this.PasswordLoginBox = new System.Windows.Forms.TextBox();
this.LoginLabel = new System.Windows.Forms.Label();
this.LoginButton = new System.Windows.Forms.Button();
this.EmailLabel = new System.Windows.Forms.Label();
this.PasswordLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// RegistrationButton
//
this.RegistrationButton.Location = new System.Drawing.Point(15, 145);
this.RegistrationButton.Location = new System.Drawing.Point(86, 145);
this.RegistrationButton.Name = "RegistrationButton";
this.RegistrationButton.Size = new System.Drawing.Size(75, 23);
this.RegistrationButton.TabIndex = 0;
@ -47,14 +49,14 @@
//
// EmailLoginBox
//
this.EmailLoginBox.Location = new System.Drawing.Point(15, 50);
this.EmailLoginBox.Location = new System.Drawing.Point(86, 44);
this.EmailLoginBox.Name = "EmailLoginBox";
this.EmailLoginBox.Size = new System.Drawing.Size(174, 22);
this.EmailLoginBox.TabIndex = 1;
//
// PasswordLoginBox
//
this.PasswordLoginBox.Location = new System.Drawing.Point(15, 94);
this.PasswordLoginBox.Location = new System.Drawing.Point(86, 87);
this.PasswordLoginBox.Name = "PasswordLoginBox";
this.PasswordLoginBox.PasswordChar = '*';
this.PasswordLoginBox.Size = new System.Drawing.Size(174, 22);
@ -71,7 +73,7 @@
//
// LoginButton
//
this.LoginButton.Location = new System.Drawing.Point(114, 145);
this.LoginButton.Location = new System.Drawing.Point(185, 145);
this.LoginButton.Name = "LoginButton";
this.LoginButton.Size = new System.Drawing.Size(75, 23);
this.LoginButton.TabIndex = 7;
@ -79,11 +81,31 @@
this.LoginButton.UseVisualStyleBackColor = true;
this.LoginButton.Click += new System.EventHandler(this.LoginButton_Click);
//
// EmailLabel
//
this.EmailLabel.AutoSize = true;
this.EmailLabel.Location = new System.Drawing.Point(12, 44);
this.EmailLabel.Name = "EmailLabel";
this.EmailLabel.Size = new System.Drawing.Size(42, 17);
this.EmailLabel.TabIndex = 8;
this.EmailLabel.Text = "Email";
//
// PasswordLabel
//
this.PasswordLabel.AutoSize = true;
this.PasswordLabel.Location = new System.Drawing.Point(12, 87);
this.PasswordLabel.Name = "PasswordLabel";
this.PasswordLabel.Size = new System.Drawing.Size(69, 17);
this.PasswordLabel.TabIndex = 9;
this.PasswordLabel.Text = "Password";
//
// LoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(373, 264);
this.Controls.Add(this.PasswordLabel);
this.Controls.Add(this.EmailLabel);
this.Controls.Add(this.LoginButton);
this.Controls.Add(this.LoginLabel);
this.Controls.Add(this.PasswordLoginBox);
@ -105,6 +127,8 @@
private System.Windows.Forms.TextBox PasswordLoginBox;
private System.Windows.Forms.Label LoginLabel;
private System.Windows.Forms.Button LoginButton;
private System.Windows.Forms.Label EmailLabel;
private System.Windows.Forms.Label PasswordLabel;
}
}