public ActionResult TaoMoi(int lop, string namHoc) { G9Service.G9_Service sv = new G9Service.G9_Service(); if (sv.NewTKB(lop, namHoc)) { string temp = ""; ThoiKhoaBieu tkb = sv.GetTKBFromLop(lop, namHoc); Lop oLop = sv.GetLop(lop); ViewData["TenLop"] = oLop.TenLop; temp += "<div id=\"div" + oLop.MaLop + "\" class=\"divTKB user-tlb\">"; temp += "<ul style='list-style: none;'>"; temp += " <li class='hder'>"; temp += " <ul style='list-style: none;'>"; temp += " <li class='tiet'> </li>"; temp += " <li class='t2'>Hai</li>"; temp += " <li class='t3'>Ba</li>"; temp += " <li class='t4'>Tư</li>"; temp += " <li class='t5'>Năm</li>"; temp += " <li class='t6'>Sáu</li>"; temp += " <li class='t7'>Bảy</li>"; temp += " <li class='cn'>CN</li>"; temp += " </ul>"; temp += " </li>"; for (int j = 1; j < 13; j++) { temp += " <li>"; temp += " <ul style='list-style: none;'>"; temp += " <li class='tiet'>Tiết " + j + "</li>"; for (int i = 2; i < 8; i++) { temp += " <li class='t" + i + "' onclick='NewTKB(" + tkb.MaTKB + "," + i + "," + j + ")'></li>"; } temp += " <li class='cn'onclick='NewTKB(" + tkb.MaTKB + "," + 8 + "," + j + "," + ")'></li>"; temp += " </ul>"; temp += " </li>"; } temp += "</ul>"; temp += "</div>"; ViewData["TKB"] = temp; } else { ViewData["TKB"] = "Không tạo được TKB. Vui lòng thử lại sau"; } return View(); }