Tuesday, September 16, 2014

Lesson 53. 20/27 (9 x 3)

1. Javascript, Jquery, undescore.js, mustache.js

Model:

 public class Product
    {
        public string ProductName { get; set; }
 
        public int Qnt { get; set; }
        public List<Feature> Fetures { get; set; }
    }
    public class Feature

    {
        public int id { get; set; }
        public double Weight { get; set; }
        public string Color { get; set; }
        public double Price { get; set; }

    }

   public ActionResult Data()
        {
            Models.Product p = new Models.Product
            {
                ProductName = "Cheese",
                Price = 89.90,
                Qnt = 2,
                Fetures = new List<Models.Feature>
                            { new Models.Feature{Color="Red", Weight=23.90},
                              new Models.Feature{Color="Blue", Weight=12.25}}
            };

            return Json(p, JsonRequestBehavior.AllowGet);
        }

Tuesday, September 9, 2014

Lesson 52. 19/27 (9 x 3)

1. Adam Freeman. Chapter 19, 20.

Lesson 51. 18/27 (9 x 3)

1. Adam Freeman. Adding Dynamic Content to a View. Sections, Partial views, Child actions.