예제 #1
0
        public tblUser(string username, string emailaddress, string password)
        {
            UserName     = username;
            EmailAddress = emailaddress;
            Password     = password;

            RecordShackCMSEntities context = new RecordShackCMSEntities();

            UserID = context.tblUsers.OrderByDescending(u => u.UserID).FirstOrDefault().UserID + 1;
        }
예제 #2
0
        public tblRating(int recordid, string comment, int rating, string username)
        {
            RecordID = recordid;
            Comment  = comment;
            Rating   = rating;

            RecordShackCMSEntities context = new RecordShackCMSEntities();

            RatingID = context.tblRatings.OrderByDescending(x => x.RatingID).FirstOrDefault().RatingID + 1;
            UserID   = context.tblUsers.Where(u => u.UserName.ToLower() == username.ToLower()).Select(u => u.UserID).FirstOrDefault();
        }
예제 #3
0
        public tblArtist(string name, string bio, string imgsrc, string imgalt)
        {
            RecordShackCMSEntities context = new RecordShackCMSEntities();

            ArtistName = name;
            ArtistBio  = bio;
            ImageSrc   = imgsrc;
            ImageAlt   = imgalt;

            ArtistID = context.tblArtists.OrderByDescending(x => x.ArtistID).FirstOrDefault().ArtistID + 1;
        }
예제 #4
0
        public tblGenre(string name, string bio, string imgsrc, string imgalt)
        {
            RecordShackCMSEntities context = new RecordShackCMSEntities();

            GenreName = name;
            GenreBio  = bio;
            ImageSrc  = imgsrc;
            ImageAlt  = imgalt;

            GenreID = context.tblGenres.OrderByDescending(x => x.GenreID).FirstOrDefault().GenreID + 1;
        }
예제 #5
0
        public tblRecord(int artistid, int genreid, string name, string bio, DateTime releasedate, string imgsrc, string imgalt)
        {
            RecordShackCMSEntities context = new RecordShackCMSEntities();

            ArtistID    = artistid;
            GenreID     = genreid;
            RecordName  = name;
            RecordBio   = bio;
            ReleaseDate = releasedate;
            ImageSrc    = imgsrc;
            ImageAlt    = imgalt;

            RecordID = context.tblRecords.OrderByDescending(x => x.RecordID).FirstOrDefault().RecordID + 1;
        }