Beispiel #1
0
        public JsonResult GetMRsAssetsItems()
        {
            try
            {
                var _mr = lIMAssetsItems.ToModel(lIMRs.Get());

                return(Json(new
                {
                    success = true,
                    data = _mr
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(new
                {
                    success = false,
                    message = ex.Message
                }, JsonRequestBehavior.AllowGet));
            }
        }
Beispiel #2
0
        public JsonResult GetItems()
        {
            try
            {
                var _ai = lIMAssetsItems.ToModel(lIAssetsItems.Get());
                var _ag = lIMAssetsItems.ToModel(lIAssetsGroups.Get());
                var _at = lIMAssetsItems.ToModel(lIAssetsTypes.Get());
                var _um = lIMAssetsItems.ToModel(lIUOMs.Get());

                return(Json(new
                {
                    success = true,
                    data = new { AITM = _ai, AGRP = _ag, ATYP = _at, UMEA = _um }
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(new
                {
                    success = false,
                    message = ex.Message
                }, JsonRequestBehavior.AllowGet));
            }
        }