Example #1
0
        public static Company LoadCompany(int companyId)
        {
            string sql = @"SELECT AccountId, BusinessName, PhoneNumber, Description, ZipCode FROM dbo.Companies WHERE Id = @GigId";

            return(SqlDataAccess.LoadSingularData <Company>(sql, companyId.ToString()).ElementAt(0));
        }
Example #2
0
        public static Gig LoadSpecificGig(string gigId)     //load one gig with specific id
        {
            string sql = @"SELECT Id, Title, Type, Footprint, Description, Zipcode, Price, CreationDate FROM dbo.Gigs WHERE Id = @gigId";

            return((SqlDataAccess.LoadSingularData <Gig>(sql, gigId)).ElementAt(0));
        }
Example #3
0
        public static int RetrieveCompanyId(string userId)      //grabs the companyId for a gig.
        {
            string sql = @"SELECT Id FROM dbo.Companies WHERE AccountId = @gigId";

            return(SqlDataAccess.LoadSingularData <int>(sql, userId).ElementAt(0));
        }