Ejemplo n.º 1
0
        public void OnPostGooglePhotos(string email)
        {
            using (SqlConnection myConn = new SqlConnection(Program.Fetch.cs))
            {
                if (Program.UserDetails.UserID != 0)
                {
                    SqlCommand addGPhoto = new SqlCommand
                    {
                        Connection = myConn
                    };
                    myConn.Open();

                    addGPhoto.Parameters.AddWithValue("@UserID", Program.UserDetails.UserID);
                    addGPhoto.Parameters.AddWithValue("@GPhoto", email);

                    addGPhoto.CommandText = ("[spAddGPhotoAccount]");
                    addGPhoto.CommandType = System.Data.CommandType.StoredProcedure;

                    var result = addGPhoto.ExecuteScalar();

                    if (result != null)
                    {
                        result = Program.UserDetails.GPhoto;
                        Program.UserDetails.PhotoChanges(Program.UserDetails.UserID);
                        GooglePhotos.GooglePhotosClientIntegrationTests GooglePhotos =
                            new GooglePhotos.GooglePhotosClientIntegrationTests();
                        GooglePhotos.Test_ListAlbums_GetFirstAlbum();
                        GooglePhotos.ListAlbumContent();
                    }

                    myConn.Close();
                }
            }
        }
Ejemplo n.º 2
0
 public void OnPostLogin(string username, string password)
 {
     Program.UserDetails.CheckID(username, password);
     Program.UserDetails.EmailChanges(Program.UserDetails.UserID);
     Program.UserDetails.PhotoChanges(Program.UserDetails.UserID);
     Program.UserDetails.ScreenChanges(Program.UserDetails.UserID);
     if (Program.UserDetails.emails != null)
     {
         Program.Calendar.CalendarSetUp();
     }
     if (Program.UserDetails.GPhoto != null)
     {
         GooglePhotos.GooglePhotosClientIntegrationTests GooglePhotos =
             new GooglePhotos.GooglePhotosClientIntegrationTests();
         GooglePhotos.ListAlbumContent();
     }
     if (Program.WeatherData != null)
     {
         WeatherChanges(@Program.UserDetails.UserID);
     }
     if (Program.NewsData != null)
     {
         NewsChanges(@Program.UserDetails.UserID);
     }
     if (Program.DateFormats != null)
     {
         DTChanges(@Program.UserDetails.UserID);
     }
 }