// GET: PointOfSale/Edit/5 public ActionResult Edit(int id) { PointOfSale cm = new PointOfSale(); cm = cs.Get(t => t.id == id); PointOfSaleModel c = new PointOfSaleModel(); c.id = cm.id; c.nom = cm.nom; c.Adress = cm.Adress; c.phone = cm.phone; c.Type = cm.Type; return(View(c)); }
// GET: PointOfSale public ActionResult Index() { List <PointOfSaleModel> lc = new List <PointOfSaleModel>(); foreach (var cm in cs.GetAll()) { PointOfSaleModel c = new PointOfSaleModel(); c.id = cm.id; c.nom = cm.nom; c.Adress = cm.Adress; c.phone = cm.phone; c.Type = cm.Type; lc.Add(c); } return(View(lc)); }