public static bool UpdateLM(LyricsMusic lm)
        {
            var en   = new ProjectNCTEntities();
            var item = en.LyricsMusics.SingleOrDefault(s => s.ID == lm.ID);

            item.LMusicDetail = lm.LMusicDetail;
            return(en.SaveChanges() > 0 ? true : false);
        }
 public IHttpActionResult Update(LyricsMusic lyricsMusic)
 {
     if (new Repositories().UpdateLyrics(lyricsMusic))
     {
         return(Ok());
     }
     return(InternalServerError());
 }
        public static bool CreateLM(LyricsMusic lm)
        {
            lm.LMusicDayCreate = DateTime.Now;
            var en = new ProjectNCTEntities();

            en.LyricsMusics.Add(lm);
            return(en.SaveChanges() > 0 ? true : false);
        }
Example #4
0
 public bool UpdateLyrics(LyricsMusic lyricsMusic)
 {
     if (new LyricsMusicBus().Update(lyricsMusic))
     {
         return(true);
     }
     return(false);
 }
Example #5
0
 public bool Update(LyricsMusic lyricsMusic)
 {
     lyricsMusic.UserID = lyricsMusic.UserID;
     if (new LyricsMusicDao().Update(lyricsMusic))
     {
         return(true);
     }
     return(false);
 }
Example #6
0
 public bool Create(LyricsMusic lyricsMusic)
 {
     lyricsMusic.LMusicDayCreate = DateTime.Now;
     if (new LyricsMusicDao().Create(lyricsMusic))
     {
         return(true);
     }
     return(false);
 }
Example #7
0
 public bool Create(LyricsMusic lyricsMusic)
 {
     db.LyricsMusics.Add(lyricsMusic);
     if (db.SaveChanges() > 0)
     {
         return(true);
     }
     return(false);
 }
        // PUT api/<controller>/5
        public IHttpActionResult Put(int id, LyricsView lv)
        {
            var item = new LyricsMusic {
                ID = lv.ID, LMusicDayCreate = lv.LMusicDayCreate, LMusicDetail = lv.LMusicDetail, MusicID = lv.MusicID, UserID = lv.UserID
            };
            var res = Repositories.UpdateLM(item);

            if (res == true)
            {
                return(Ok());
            }
            return(InternalServerError());
        }
Example #9
0
        public bool Update(LyricsMusic lyricsMusic)
        {
            var data = db.LyricsMusics.SingleOrDefault(s => s.ID == lyricsMusic.ID);

            data.LMusicDetail = lyricsMusic.LMusicDetail;
            data.MusicID      = lyricsMusic.MusicID;
            data.UserID       = lyricsMusic.UserID;
            if (db.SaveChanges() > 0)
            {
                return(true);
            }
            return(false);
        }
Example #10
0
 public static bool UpdateLM(LyricsMusic lm)
 {
     return(MusicBUS.UpdateLM(lm));
 }
Example #11
0
 public static bool CreateLM(LyricsMusic lm)
 {
     return(MusicBUS.CreateLM(lm));
 }
Example #12
0
 public static bool UpdateLM(LyricsMusic lm)
 {
     return(LyricsMusicDAO.UpdateLM(lm));
 }
Example #13
0
 public static bool CreateLM(LyricsMusic lm)
 {
     return(LyricsMusicDAO.CreateLM(lm));
 }