Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ClienteDestino clienteDestino = db.ClienteDestino.Find(id);

            db.ClienteDestino.Remove(clienteDestino);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id,id_cliente,id_destino,id_contacto,estado")] ClienteDestino clienteDestino)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clienteDestino).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_cliente  = new SelectList(db.clientes, "id", "rut", clienteDestino.id_cliente);
     ViewBag.id_destino  = new SelectList(db.destinos, "id", "nombre", clienteDestino.id_destino);
     ViewBag.id_contacto = new SelectList(db.Personas, "id", "rut", clienteDestino.id_contacto);
     return(View(clienteDestino));
 }
Beispiel #3
0
        // GET: ClienteDestinoes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClienteDestino clienteDestino = db.ClienteDestino.Find(id);

            if (clienteDestino == null)
            {
                return(HttpNotFound());
            }
            return(View(clienteDestino));
        }
Beispiel #4
0
        // GET: ClienteDestinoes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClienteDestino clienteDestino = db.ClienteDestino.Find(id);

            if (clienteDestino == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_cliente  = new SelectList(db.clientes, "id", "rut", clienteDestino.id_cliente);
            ViewBag.id_destino  = new SelectList(db.destinos, "id", "nombre", clienteDestino.id_destino);
            ViewBag.id_contacto = new SelectList(db.Personas, "id", "rut", clienteDestino.id_contacto);
            return(View(clienteDestino));
        }
Beispiel #5
0
        public static IClienteDestino GetClienteDestino()
        {
            ClienteDestino clienteDestino = new ClienteDestino();

            return((IClienteDestino)clienteDestino);
        }