示例#1
0
        // Set Up Test List
        public ActionResult SetUpTest(long id)
        {
            ViewBag.IdBatch = id; // mengirim bath id

            List <TestViewModel> data = TestRepo.All("");

            foreach (var item in data)
            {
                BatchTestViewModel btmodel = BatchRepo.Check(id, item.id);
                if (btmodel.batch_id == 0)
                {
                    item.check = true;
                }
                else
                {
                    item.check = false;
                }
            }

            return(PartialView("_SetUpTest", data));
        }
 public ActionResult Edit(long id)
 {
     ViewBag.TestList      = new SelectList(TestRepo.All(""), "id", "name");
     ViewBag.Test_TypeList = new SelectList(TestTypeRepo.GetBySearch(""), "id", "name");
     return(PartialView("_Edit", Document_TestRepo.ById(id)));
 }
 public ActionResult Create()
 {
     ViewBag.TestList      = new SelectList(TestRepo.All(""), "id", "name");
     ViewBag.Test_TypeList = new SelectList(TestTypeRepo.GetBySearch(""), "id", "name");
     return(PartialView("_Create"));
 }
示例#4
0
 // List & Search
 public ActionResult List(string search = "")
 {
     return(PartialView("_List", TestRepo.All(search)));
 }
示例#5
0
 public ActionResult Test()
 {
     ViewBag.Testlist = new SelectList(TestRepo.All(), "id", "name");
     return(PartialView("_Test"));
 }
示例#6
0
        public ActionResult Search(string code)
        {
            List <TestViewModel> item = TestRepo.All(code);

            return(PartialView("_List", item));
        }
示例#7
0
 public ActionResult List()
 {
     return(PartialView("_List", TestRepo.All()));
 }