/// <summary> /// PopulateDDL /// </summary> /// <returns></returns> private TestExpressionViewModel PopulateDDL() { TestExpressionViewModel expModel = new TestExpressionViewModel(); expModel.TestMasterItems = testExpService.GetAllTestMasters().AsEnumerable() .Select(testItem => new SelectListItem() { Text = testItem.TestMasterName, Value = testItem.TestMasterID.ToString() });; expModel.ComponentItems = testExpService.GetAllComponents().AsEnumerable() .Select(comp => new SelectListItem() { Text = comp.ComponentName, Value = comp.ShortName });; return(expModel); }
// GET: cBaseQMS/TestExpression public ActionResult Index() { TestExpressionViewModel expModel = PopulateDDL(); return(View(expModel)); }