Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            LeftFooterModel leftFooterModel = db.leftFooterModel.Find(id);

            db.leftFooterModel.Remove(leftFooterModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,LeftFooterModelID,para1,para2,videourl,noofLikes,videoDescription")] LeftFooterModel leftFooterModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(leftFooterModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(leftFooterModel));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,LeftFooterModelID,para1,para2,videourl,noofLikes,videoDescription")] LeftFooterModel leftFooterModel)
        {
            if (ModelState.IsValid)
            {
                db.leftFooterModel.Add(leftFooterModel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(leftFooterModel));
        }
Exemplo n.º 4
0
        // GET: LeftFooterModels/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LeftFooterModel leftFooterModel = db.leftFooterModel.Find(id);

            if (leftFooterModel == null)
            {
                return(HttpNotFound());
            }
            return(View(leftFooterModel));
        }
        public ActionResult Index()
        {
            LeftFooterModel lfm = new LeftFooterModel(1, "Hi i am suvvansh", "there is a way", "youtube.com", 6, "yes thats youtube");

            lfm.para1                = "Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. The term is generally used to describe data centers available to many users over the Internet.";
            lfm.videourl             = "https://www.youtube.com/embed/9dae0R3pkEo?autoplay=1&fs=1&iv_load_policy=1&showinfo=1&rel=1&cc_load_policy=1&start=0&end=0&origin=https://youtubeembedcode.com";
            lfm.noofLikes            = 6;
            lfm.videoDescription     = "Technical Webinar: Developing .NET MVC Websites with Kentico Cloud*";
            ViewBag.videodescription = lfm.videoDescription;
            ViewBag.para1            = lfm.para1;
            ViewBag.nooflikes        = lfm.noofLikes;

            return(View());
        }