Exemplo n.º 1
0
        public ActionResult Form(int?id, Operacion operacion)
        {
            var customer = new Customer();

            if (id.HasValue)
            {
                customer = servicioCustomer.obtenerPorID(id.Value);
            }
            ViewData["Operacion"] = operacion;

            return(View(customer));
        }
Exemplo n.º 2
0
        public ActionResult Form(int?Id /*puede aceptar nulos*/, Operacion operacion)
        {
            var customer = new Customer();

            //SI EL Id TIENE UN VALOR, ENTONCES SE PROCEDE A BUSCAR UNA CARRERA
            if (Id.HasValue)
            {
                customer = servicio.obtenerPorID(Id.Value);
            }
            //INDICA LA OPERACION QUE ESTAMOS REALIZANDO EN EL FORMULARIO
            ViewData["Operacion"] = operacion;
            return(View(customer));
        }