Esempio n. 1
0
        public ActionResult Delete(int id, FormCollection collection)
        {
            PointOfProspection c = new PointOfProspection();

            c = cs.Get(t => t.id == id);
            cs.Delete(c);
            cs.Commit();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        // GET: PointOfProspection/Edit/5
        public ActionResult Edit(int id)
        {
            PointOfProspection cm = new PointOfProspection();

            cm = cs.Get(t => t.id == id);
            PointOfProspectionModel c = new PointOfProspectionModel();

            c.id     = cm.id;
            c.nom    = cm.nom;
            c.Adress = cm.Adress;

            c.Type = cm.Type;

            return(View(c));
        }
Esempio n. 3
0
        public ActionResult Edit(int id, PointOfProspectionModel cm)
        {
            PointOfProspection c = new PointOfProspection();

            c    = cs.Get(t => t.id == id);
            c.id = cm.id;

            c.Adress = cm.Adress;
            c.nom    = cm.nom;
            c.Type   = cm.Type;


            cs.Update(c);
            cs.Commit();
            return(RedirectToAction("Index"));
        }
Esempio n. 4
0
        public ActionResult Create(PointOfProspectionModel cm)
        {
            PointOfProspection c = new PointOfProspection();

            c.id = cm.id;

            c.Adress = cm.Adress;
            c.nom    = cm.nom;
            c.Type   = cm.Type;



            cs.Add(c);
            cs.Commit();
            return(View("Index", "~/Views/Shared/_CustomerLayout.cshtml"));
        }