public static bool InsertUser(string firstName, string lastName, string username, string password, string email, string street, string city, string state, string zipcode) { bool inserted = LocationHandler.InsertLocation(street, city, state, zipcode); List <Plocation> locations = LocationHandler.GetLocationData(); if (inserted == true) { Puser user = new Puser { Firstname = firstName, Lastname = lastName, Username = username, PPassword = password, Email = email, LocationId = locations[locations.Count - 1].LocationId }; int icount = new Crud().AddUser(user); if (icount == 0) { return(false); } } else { return(false); } return(true); }