Ejemplo n.º 1
0
        public ActionResult Create(int id)
        {
            var model = new NewClientPriceViewModel()
            {
                Client        = db.Clients.Find(id),
                ClientPrice   = new ClientPrice(id),
                PricePerHours = db.PricePerHours.Where(p => p.Public == true).ToList()
            };

            return(View(model));
        }
Ejemplo n.º 2
0
 public ActionResult SaveCreate(NewClientPriceViewModel model)
 {
     db.ClientPrices.Add(model.ClientPrice);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }