Exemplo n.º 1
0
        public ActionResult Editar(ViewTanda model)
        {
            ServicioSoapClient client = new ServicioSoapClient();

            Tanda item = new Tanda();

            item.ID_pelicula = model.ID_pelicula;
            item.ID_sala     = model.ID_sala;
            item.ID_tanda    = model.ID_tanda;
            try
            {
                if (ModelState.IsValid)
                {
                    client.ActualizarTanda(item);

                    return(Redirect("~/Tanda/Index/"));
                }

                return(View(model));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 2
0
        public ActionResult Editar(int id)
        {
            ServicioSoapClient client = new ServicioSoapClient();
            var       model           = client.GetTandabyID(id);
            ViewTanda item            = new ViewTanda();


            item.ID_pelicula = model.ID_pelicula;
            item.ID_sala     = model.ID_sala;
            item.ID_tanda    = model.ID_tanda;

            return(View(item)); //acá lo voy a devolver
        }