public JsonResult Create(AssetLocationVM vmObj)
        {
            bool isSaved = false;

            if (ModelState.IsValid)
            {
                var var = vmObj;

                isSaved = _Manager.Save(var.AssetLocation);
            }



            if (isSaved)
            {
                status  = true;
                message = "Succesfully Saved";
            }
            else
            {
                message = "Error! Please try again.";
            }

            return(new JsonResult {
                Data = new { status = status, message = message }
            });
        }
        public JsonResult Search(AssetLocationVM vmObj)
        {
            var var = vmObj;

            var var2 = _Manager.GetBySearchItem(var.AssetLocation);

            return(new JsonResult {
                Data = var2, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public ActionResult Index()
        {
            var selectListItem = GetSelectListItems();
            var model          = new AssetLocationVM();

            model.OrganizationList = selectListItem;
            model.AssetLocation    = new AssetLocation();

            return(View(model));
        }
        public JsonResult Edit(AssetLocationVM vmObj)
        {
            bool isUpdated = _Manager.Update(vmObj.AssetLocation);


            if (isUpdated)
            {
                status = true;

                message = "Update Successfully!!";
            }


            return(new JsonResult {
                Data = new { status = status, message = message }
            });
        }