public ActionResult Create([Bind(Include = "Language_id,Language_type")] Language language)
        {
            if (ModelState.IsValid)
            {
                db.Language.Add(language);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(language));
        }
예제 #2
0
        public ActionResult Create([Bind(Include = "Album_id,Singer_id,Datetime,Album_Name,Pic,About,Company,Price")] Album albums)
        {
            if (ModelState.IsValid)
            {
                db.Album.Add(albums);
                db.SaveChanges();
                return(RedirectToAction("Albums"));
            }

            return(View(albums));
        }
        public ActionResult Create([Bind(Include = "Id,Name,Email,Subject,Message")] GiveBacks giveBacks)
        {
            if (ModelState.IsValid)
            {
                db.GiveBacks.Add(giveBacks);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(giveBacks));
        }
예제 #4
0
        public ActionResult Create([Bind(Include = "Style_id,Style_type,Album_id")] Style style)
        {
            if (ModelState.IsValid)
            {
                db.Style.Add(style);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.Album_id = new SelectList(db.Album, "Album_id", "Album_Name", style.Album_id);
            return View(style);
        }
예제 #5
0
        public ActionResult Create([Bind(Include = "Song_id,Album_id,Song_name")] Song song)
        {
            if (ModelState.IsValid)
            {
                db.Song.Add(song);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Album_id = new SelectList(db.Album, "Album_id", "Album_Name", song.Album_id);
            return(View(song));
        }
        public ActionResult Create([Bind(Include = "Event_id,Name,Singer_id,Datetime,Pic,Adress,About")] EventView eventView)
        {
            if (ModelState.IsValid)
            {
                db.EventView.Add(eventView);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Singer_id = new SelectList(db.Singer, "Singer_id", "Name", eventView.Singer_id);
            return(View(eventView));
        }
예제 #7
0
        public ActionResult Create([Bind(Include = "Order_id,Datetime,AspNetUsers_Id,RecieverName,RecieverPhone,RecieverAdress")] Order order)
        {
            if (ModelState.IsValid)
            {
                db.Order.Add(order);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AspNetUsers_Id = new SelectList(db.AspNetUsers, "Id", "Email", order.AspNetUsers_Id);
            return(View(order));
        }
예제 #8
0
        public ActionResult Create([Bind(Include = "Singer_id,Name,Gender,Country,Language_id")] Singer singer)
        {
            if (ModelState.IsValid)
            {
                db.Singer.Add(singer);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Language_id = new SelectList(db.Language, "Language_id", "Language_type", singer.Language_id);
            return(View(singer));
        }
예제 #9
0
        public ActionResult Create([Bind(Include = "Album_id,Singer_id,Datetime,Album_Name,Pic,About,Company,Price,Hits,WeekHits,MonthHits")] Album album)
        {
            if (ModelState.IsValid)
            {
                db.Album.Add(album);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Singer_id = new SelectList(db.Singer, "Singer_id", "Name", album.Singer_id);
            return(View(album));
        }
예제 #10
0
        public ActionResult Create([Bind(Include = "OrderDetail_id,Order_id,Album_id,Count,Price")] OrderDetail orderDetail)
        {
            if (ModelState.IsValid)
            {
                db.OrderDetail.Add(orderDetail);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Album_id = new SelectList(db.Album, "Album_id", "Album_Name", orderDetail.Album_id);
            ViewBag.Order_id = new SelectList(db.Order, "Order_id", "AspNetUsers_Id", orderDetail.Order_id);
            return(View(orderDetail));
        }
예제 #11
0
        public ActionResult Create([Bind(Include = "Like_id,Song_id,User_id,AspNetUsers_Id")] Like like)
        {
            if (ModelState.IsValid)
            {
                db.Like.Add(like);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AspNetUsers_Id = new SelectList(db.AspNetUsers, "Id", "Email", like.AspNetUsers_Id);
            ViewBag.Song_id        = new SelectList(db.Song, "Song_id", "Song_name", like.Song_id);
            return(View(like));
        }