Beispiel #1
0
        public ActionResult Create(aloTipoInput input)
        {
            if (!ModelState.IsValid) return PartialView("Create", input);
            var entity = UnitOfWork.AloTipoRepository.GetById(input.Id);

            entity.nombre = input.nombre;
            entity.restricFDStempAlta = input.restricFDStempAlta;
            entity.clase = input.clase;
            entity.croquis = input.croquis;
            entity.idSede_idSede = input.idSede;
            entity.restricFDStempAlta = input.restricFDStempAlta;

            UnitOfWork.AloTipoRepository.Update(entity);
            UnitOfWork.Save();

            return Json(MapToGridModel(entity)); // returning grid model, used in grid.api.renderRow
        }
Beispiel #2
0
        public ActionResult Edit(aloTipoInput input)
        {
            if (!ModelState.IsValid) return PartialView("Create", input);
            var entity = UnitOfWork.AloTipoRepository.GetById(input.Id);

            entity.nombre = input.nombre;
            entity.clase = input.clase;
            entity.croquis = input.croquis;
            entity.idSede_idSede = input.idSede;
            entity.restricFDStempAlta = input.restricFDStempAlta;

            UnitOfWork.AloTipoRepository.Update(entity);
            UnitOfWork.Save();

            // returning the key to call grid.api.update
            return Json(new { entity.Id });
        }
Beispiel #3
0
        public ActionResult Edit(int id)
        {
            var entity = UnitOfWork.AloTipoRepository.GetById(id);

            var input = new aloTipoInput
            {
                Id = entity.Id,
                nombre = entity.nombre,
                clase = entity.clase,
                croquis = entity.croquis,
                idSede = entity.idSede_idSede,
                restricFDStempAlta = entity.restricFDStempAlta,

            };

            return PartialView("Create", input);
        }