public ActionResult _DeleteTypeExistence(Int32?TypeExistenceId, Int32?FatherId)
        {
            var model = new _DeleteTypeExistenceViewModel();

            model.Fill(CargarDatosContext(), TypeExistenceId, FatherId);
            return(View(model));
        }
        public ActionResult _DeleteTypeExistence(_DeleteTypeExistenceViewModel model)
        {
            try
            {
                TypeExistence TypeExistence = null;

                if (model.TypeExistenceId.HasValue)
                {
                    TypeExistence       = context.TypeExistence.FirstOrDefault(x => x.TypeExistenceId == model.TypeExistenceId);
                    TypeExistence.State = ConstantHelpers.ESTADO.INACTIVO;
                }

                context.SaveChanges();
                PostMessage(MessageType.Success);
            }
            catch (Exception ex)
            {
                PostMessage(MessageType.Error);
            }

            return(RedirectToAction("ListTypeExistence", new { FatherId = model.FatherId }));
        }