Exemple #1
0
        public DriverLogin getUser(string EmailAddress, string Password)
        {
            DriverLogin use   = null;
            string      query = "SELECT EmailAddress,Password WHERE EmailAddress=@EmailAddress AND Password=@Password";


            using (SqlConnection connect = new SqlConnection("MyAppDataEntities"))
            {
                using (SqlCommand comma = new SqlCommand(query, connect))
                    try
                    {
                        connect.Open();
                        comma.CommandText = "INSERT INTO [dbo].[Driver](EmailAddress,Password) VALUES(@EmailAddress,@Password)";
                        comma.Parameters.AddWithValue("@EmailAddress", EmailAddress);
                        comma.Parameters.AddWithValue("@Password", Password);
                        comma.ExecuteNonQuery();
                    }
                    catch
                    {
                        connect.Close();
                    }
            }

            return(use);
        }
Exemple #2
0
 internal long User(DriverLogin id)
 {
     throw new NotImplementedException();
 }