Exemple #1
0
        public JsonResult GetAllTestMasters(int?testMasterid, Boolean ForCopyTo = false)
        {
            IEnumerable <SelectListItem> testMasterList = new List <SelectListItem>();

            if (!ForCopyTo)
            {
                //use of helper method to create select list item
                testMasterList = SelectListItemAdapter.GetSelectListItemCollection(_iTestMaserClient.GetAll(), o => o.TestMasterName, o => o.TestMasterID.ToString(), Convert.ToString(testMasterid));
            }
            else
            {
                testMasterList = SelectListItemAdapter.GetSelectListItemCollection(_iTestMaserClient.GetAll(), o => o.TestMasterName, o => Convert.ToString(o.TestMasterID));
            }
            return(Json(testMasterList, JsonRequestBehavior.AllowGet));
        }
        public IActionResult Index()
        {
            var testMasterViewmodel = _iTestMaserClient.GetAll().ToList();

            return(View(testMasterViewmodel));
            //return View();
        }
        public JsonResult GetAllTestMasters()
        {
            var objGetTestMasterByTestIdViewModel = _iTestMaserClient.GetAll();

            var jsonData = new { rows = objGetTestMasterByTestIdViewModel };

            return(Json(jsonData, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Index(string name = null)
        {
            var testMaster = _iTestMaserClient.GetAll();

            return(View(testMaster));
        }