public ActionResult _DeleteMeasureUnit(Int32?MeasureUnitId)
        {
            var model = new _DeleteMeasureUnitViewModel();

            model.Fill(CargarDatosContext(), MeasureUnitId);
            return(View(model));
        }
        public ActionResult _DeleteMeasureUnit(_DeleteMeasureUnitViewModel model)
        {
            MeasureUnit MeasureUnit = null;

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

            context.SaveChanges();
            PostMessage(MessageType.Success);

            return(RedirectToAction("ListMeasureUnit"));
        }